Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component: @phase2/outline-core-breadcrumb #429

Open
wants to merge 17 commits into
base: next
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: done except icons
glitchgirl committed Jan 18, 2024
commit 0914adc70a4fded9a6690781d2dcc1d87e26178d
Original file line number Diff line number Diff line change
@@ -1,9 +1,77 @@
/** Jake, I removed your notes I promise I read them. - Morgan **/

:host {
background-color: green;
ol,
ul {
list-style: none;

margin: 10px;

padding: 10px;

display: flex;

flex-direction: row;

flex-wrap: wrap;

gap: 10px;
}

li {
list-style: none;
display: flex;
flex-direction: row;
align-items: center;
position: relative;
padding: 10px;

margin: 10px;
}

/**
* Using width,height,background,transform for breadcrumb separator because
* content: "/"; was getting read by screen readers.
*/
li:not(:first-of-type)::before {
content: '';
display: flex;
margin-right: 10px;
height: 1em;
width: 1px;
background: currentColor;
transform: rotate(23deg);
}

a {
text-decoration: none;
display: inline-flex;
align-items: center;

padding:10px;
margin:10px;


&:hover {
text-decoration: underline;
}
&:focus,
&:focus-visible {
outline: solid 3px blue;
border-radius: var(--border-radius-button-default);
outline-offset: var(--spacing-px);

@screen lg {
outline: solid 3px blue;
}
}
}

.separator {
margin-left: 10px;
}

span {
color: red;
.previous-link {
display: flex;
flex-direction: row;
align-items: center;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/** Jake, I removed your notes I promise I read them. - Morgan **/

ol,
ul {
list-style: none;

margin: 10px;

padding: 10px;

display: flex;

flex-direction: row;

flex-wrap: wrap;

gap: 10px;
}

li {
list-style: none;
display: flex;
flex-direction: row;
align-items: center;
position: relative;
padding: 10px;

margin: 10px;
}

/**
* Using width,height,background,transform for breadcrumb separator because
* content: "/"; was getting read by screen readers.
*/
li:not(:first-of-type)::before {
content: '';
display: flex;
margin-right: 10px;
height: 1em;
width: 1px;
background: currentColor;
transform: rotate(23deg);
}

a {
text-decoration: none;
display: inline-flex;
align-items: center;

padding:10px;
margin:10px;


&:hover {
text-decoration: underline;
}
&:focus,
&:focus-visible {
outline: solid 3px blue;
border-radius: var(--border-radius-button-default);
outline-offset: var(--spacing-px);

@screen lg {
outline: solid 3px blue;
}
}
}

.separator {
margin-left: 10px;
}

.previous-link {
display: flex;
flex-direction: row;
align-items: center;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { html, TemplateResult, CSSResultGroup, css } from 'lit';
import { customElement } from 'lit/decorators.js';

import { AdoptedStyleSheets } from '@phase2/outline-adopted-stylesheets-controller';
// Our base component, which all others extend.
import { OutlineElement, SlotsController } from '@phase2/outline-core';
import componentStyles from './outline-core-breadcrumb.css.lit';
import globalStyles from './outline-core-breadcrumb.lightdom.css.lit';
import { ResizeController } from './resize-controller';

/** The element name, reused throughout the codebase */
@@ -31,6 +32,13 @@ const componentName = 'outline-core-breadcrumb';
@customElement(componentName)
export class OutlineCoreBreadcrumb extends OutlineElement {
static styles: CSSResultGroup = [componentStyles, componentStyles, css``];
AdoptedStyleSheets: AdoptedStyleSheets;

connectedCallback() {
super.connectedCallback();
this.AdoptedStyleSheets = new AdoptedStyleSheets(globalStyles);
this.addController(this.AdoptedStyleSheets);
}

slots = new SlotsController(this);
resizeController = new ResizeController(this, {
700 changes: 348 additions & 352 deletions packages/documentation/outline-storybook/config/storybook.main.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import { Meta, Canvas, Story } from '@storybook/addon-docs';
import { OutlineCoreBreadcrumb } from '../../../../../packages/components/outline-core-breadcrumb/src/outline-core-breadcrumb';
Copy link

@coderabbitai coderabbitai bot Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import path for OutlineCoreBreadcrumb seems overly complex and potentially brittle. Consider simplifying the import path by configuring your build tool to support aliasing or by reorganizing the directory structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be updated once this is a package

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glitchgirl: Understood, it's great to hear that there are plans to simplify the import paths once it becomes a package. If there's any support or assistance needed during this transition, feel free to let me know. Looking forward to seeing the updates!


<Meta
title="Navigation/AwesomeBreadcrumb"
title="Navigation/ Core Breadcrumb"
component="outline-core-breadcrumb"
parameters={{
viewMode: 'docs',