-
Notifications
You must be signed in to change notification settings - Fork 6
project: Storybook audit #1337
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
Draft
shreeyash07
wants to merge
25
commits into
develop
Choose a base branch
from
fix/storybook-ui-audit
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
project: Storybook audit #1337
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
b3461f9
Input label
shreeyash07 864e757
ProgressBar
shreeyash07 49b6165
Modal
shreeyash07 8ab9209
- Breadcrumbs icon and weight changes
shreeyash07 a0555d2
Add stroke in pie chart
shreeyash07 a57a856
Add Missing stories and audit storybook
63a82a4
Update secondary tab new design
shreeyash07 8ac1ebd
change the styling of ui component stories
333dbf7
Add Close Button for infopopup component
b5288ad
Add gray tertiary button for button component
e5f5757
Update breadcrumb component
shreeyash07 f9f2d03
Update MultiSelectInput and InputContainer
shreeyash07 102a4d7
fix ActiveOperation filter action
shreeyash07 27a5b9b
fix header font size and table label color
3a1ca4b
Update Secondary tab stories for tab component
fd5e894
Add GoBreadcrumbs component
shreeyash07 98cfa26
Update footer stories and checkboxiconfill
72ab31f
Add select all and clear all button for Multiselect Input
shreeyash07 9a559ef
Update selectall button for multiselectinput
61b5625
Update orientaition of the dropdown
shreeyash07 36494fc
Add Key and label selector in breadcrumbs
shreeyash07 22fd1d4
Fix renderParams in stories
roshni73 a892214
Update and add missing design tokens
shreeyash07 1bb82e5
Fix table stories and default message
roshni73 a3ecadf
Fix textinput, validate button, dateinput
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,46 @@ | ||
| import { useCallback } from 'react'; | ||
| import { Breadcrumbs } from '@ifrc-go/ui'; | ||
|
|
||
| import Link, { type InternalLinkProps } from '../Link'; | ||
|
|
||
| interface RouteData { | ||
| to: InternalLinkProps['to']; | ||
| label: React.ReactNode; | ||
| urlParams?: Record<string, string | number | null | undefined>; | ||
| } | ||
|
|
||
| interface GoBreadcrumbsProps { | ||
| routeData: RouteData[]; | ||
| } | ||
|
|
||
| const keySelector = (datum: RouteData) => datum.to; | ||
| const labelSelector = (datum: RouteData) => datum.label; | ||
|
|
||
| function GoBreadcrumbs(props: GoBreadcrumbsProps) { | ||
| const { routeData } = props; | ||
|
|
||
| const rendererParams = useCallback((_: RouteData['to'], item: RouteData) | ||
| : InternalLinkProps => ( | ||
| { | ||
| to: item.to, | ||
| urlParams: item.urlParams, | ||
| } | ||
| ), []); | ||
|
|
||
| return ( | ||
| <Breadcrumbs | ||
| < | ||
| RouteData['to'], | ||
| RouteData, | ||
| (InternalLinkProps & { children: React.ReactNode }) | ||
| > | ||
| data={routeData} | ||
| keySelector={keySelector} | ||
| labelSelector={labelSelector} | ||
| renderer={Link} | ||
| rendererParams={rendererParams} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default GoBreadcrumbs; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
I am not sure if changing how we use Breadcrums is a good change.
cc: @frozenhelium @samshara
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.
@tnagorra Can you propose a better alternative. The requirement is that we need to separately style the leaf link.
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.
Looks like the leaf link is already styled differently in current approach as well.
We can use this new approach if we want more flexibility.