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
Fixes #23391, #23251 - adjust breadcrumbs switcher to pf design #5493
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import '@storybook/addon-actions/register'; | ||
import '@storybook/addon-knobs/register'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
webpack/assets/javascripts/react_app/components/BreadcrumbBar/BreadcrumbBar.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { boolean, number, withKnobs } from '@storybook/addon-knobs'; | ||
import { action } from '@storybook/addon-actions'; | ||
import BreadcrumbBar from './BreadcrumbBar'; | ||
|
||
storiesOf('BreadcrumBar', module) | ||
.addDecorator(withKnobs) | ||
.add('With open switcher', () => ( | ||
<BreadcrumbBar | ||
isLoadingResources={boolean('is loading', false)} | ||
loadSwitcherResourcesByResource={action('load switcher data')} | ||
isSwitcherOpen={boolean('is switcher open', true)} | ||
totalPages={number('total pages', 3)} | ||
currentPage={number('current page', 2)} | ||
hasError={boolean('has error', false)} | ||
resourceSwitcherItems={[ | ||
{ name: 'item 1', id: 1 }, | ||
{ name: 'item 2', id: 2 }, | ||
{ | ||
name: | ||
'item 3 with a very very very very very very very very long name', | ||
id: 3, | ||
}, | ||
]} | ||
data={{ | ||
resource: { | ||
resourceUrl: 'some_url', | ||
}, | ||
isSwitchable: true, | ||
breadcrumbItems: [ | ||
{ caption: 'Index Page', url: '#' }, | ||
{ caption: 'Resource Page' }, | ||
], | ||
}} | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 50 additions & 30 deletions
80
.../javascripts/react_app/components/BreadcrumbBar/components/BreadcrumbSwitcherPopover.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,62 @@ | ||
@import '../../../common/colors'; | ||
|
||
.popover-content { | ||
max-height: $switcher-max-height; | ||
overflow-y: auto; | ||
max-width: $switcher-max-width; | ||
min-width: $switcher-max-width; | ||
|
||
.fa-spinner { | ||
margin-top: 12px; | ||
} | ||
#breadcrumb-switcher-popover { | ||
z-index: 1000 !important; | ||
|
||
.breadcrumb-switcher-popover-error { | ||
color: #f00; | ||
} | ||
.popover-content { | ||
padding-left: 0; | ||
padding-right: 0; | ||
max-height: $switcher-max-height; | ||
overflow: hidden; | ||
max-width: $switcher-max-width; | ||
min-width: $switcher-max-width; | ||
|
||
.list-group-item { | ||
padding: 5px 3px; | ||
.fa-spinner { | ||
margin-top: 12px; | ||
} | ||
|
||
&:hover { | ||
color: #fff; | ||
background-color: #39a5dc; | ||
border-color: #39a5dc; | ||
.breadcrumb-switcher-popover-error { | ||
text-indent: 10px; | ||
color: #f00; | ||
} | ||
} | ||
|
||
.no-border { | ||
border: none; | ||
} | ||
} | ||
.list-group-item { | ||
padding: 5px 3px; | ||
text-indent: 10px; | ||
|
||
#breadcrumb-switcher-popover { | ||
z-index: 1000 !important; | ||
} | ||
&:hover { | ||
color: #fff; | ||
background-color: #0089c7; | ||
} | ||
|
||
.scrollable-list { | ||
margin-top: 5px; | ||
&.active { | ||
background-color: #0089c7; | ||
} | ||
} | ||
|
||
.no-border { | ||
border: none; | ||
} | ||
|
||
.pager { | ||
margin: 10px 13px; | ||
|
||
a { | ||
width: 22px; | ||
} | ||
|
||
&.list-group { | ||
border-top: 0; | ||
.fa { | ||
margin-left: -2px; | ||
} | ||
} | ||
|
||
.scrollable-list { | ||
margin-top: 5px; | ||
|
||
&.list-group { | ||
border-top: 0; | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
.input-search { | ||
position: relative; | ||
left: 5px; | ||
left: 20px; | ||
|
||
input { | ||
text-indent: 25px; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
just noticed there is package dep, @ekohl ack? (even if this package is only used to generate the storybook and never used in building the app).