-
Notifications
You must be signed in to change notification settings - Fork 105
feature(contextSelector): add context selector component #1288
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
Conversation
|
Deploy preview for pf-next ready! Built with commit fc90d48 |
|
@srambach thanks! Those issues relate to the input group component that I used. I can create an issue to fix those. |
| @@ -0,0 +1,7 @@ | |||
| <ul class="pf-c-context-selector__menu-menu{{#if context-selector-menu-menu--modifier}} {{context-selector-menu-menu--modifier}}{{/if}}" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of pf-c-context-selector__menu-menu, could it be called pf-c-context-selector__menu-list to be a little less like Little Caesar's Pizza Pizza? 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes haha !
|
When I open this in Firefox, the input group is overlapping its container. Interestingly, in Chrome the spacing I see is different from @srambach and actually looks OK. |
| align-items: center; | ||
| justify-content: space-between; | ||
| min-width: var(--pf-c-context-selector__toggle--MinWidth); | ||
| min-width: 100%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are there 2 min-widths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea, keeping the second one
| margin-left: var(--pf-c-context-selector__toggle-icon--MarginLeft); | ||
| } | ||
|
|
||
| .pf-c-context-selector__toggle-text { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you put a ton of text in here, it just makes the button wider and doesn't truncate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome added a max-width
| @@ -0,0 +1,145 @@ | |||
| {{#> context-selector id="context-selector-collapsed-example" context-selector--label-text="My Project"}} | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the label text and toggle text should match... I'm not sure how to handle this though. The label might read something like "Selected project"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to go with that
| | `.pf-c-context-selector__menu-input` | `<div>` | Initiates a container for the input group. | | ||
| | `.pf-c-context-selector__menu-menu` | `<ul>` | Initiaties an unordered list of menu items that sits under the input container. | | ||
| | `.pf-c-context-selector__menu-menu-item` | `<li>` | Initiaties a menu item. | | ||
| | `.pf-m-expanded.` | `.pf-c-context-selector` | Modifies for the expanded state. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `.pf-m-expanded.` | `.pf-c-context-selector` | Modifies for the expanded state. | | |
| | `.pf-m-expanded` | `.pf-c-context-selector` | Modifies for the expanded state. | |
| --pf-c-context-selector__toggle--PaddingRight: var(--pf-global--spacer--sm); | ||
| --pf-c-context-selector__toggle--PaddingBottom: var(--pf-global--spacer--form-element); | ||
| --pf-c-context-selector__toggle--PaddingLeft: var(--pf-global--spacer--sm); | ||
| --pf-c-context-selector__toggle--MinWidth: var(--pf-global--target-size--MinWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look like this is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
mcoker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
| --pf-c-context-selector__menu-list-item--disabled--Color: var(--pf-global--Color--dark-200); | ||
| --pf-c-context-selector__menu-list-item--disabled--BackgroundColor: transparent; | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add @extend %pf-t-light; and remove the transparent backgrounds on lines 12 and 61. This will fix the theme issue.
|
🎉 This PR is included in version 1.0.161 🎉 The release is available on: Your semantic-release bot 📦🚀 |



close #133