-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add activatable status indicator to toolbar v2 #847
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
Changes from all commits
61c88f5
35be601
c04d66d
5b41e64
8b4370d
31fab60
d1c9db9
7b59c65
6168f38
98e26f0
1f3c0f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,12 @@ const GuidesList = ({ | |
| displayOption: DisplayOption; | ||
| }) => { | ||
| return guides.map((guide, idx) => { | ||
| if ( | ||
| displayOption === "current-page" && | ||
| (!guide.annotation.isEligible || !guide.annotation.isQualified) | ||
| ) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Current-page filter overstates displayable guidesMedium Severity The new Additional Locations (1)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not an issue in this PR, as it will be captured in |
||
| return null; | ||
| } | ||
| if (displayOption === "all-eligible" && !guide.annotation.isEligible) { | ||
| return null; | ||
| } | ||
|
|
@@ -39,7 +45,7 @@ export const V2 = () => { | |
| const { client } = useGuideContext(); | ||
|
|
||
| const [guidesListDisplayOption, setGuidesListDisplayOption] = | ||
| React.useState<DisplayOption>("all-eligible"); | ||
| React.useState<DisplayOption>("current-page"); | ||
|
|
||
| const [isVisible, setIsVisible] = React.useState(detectToolbarParam()); | ||
| const [isCollapsed, setIsCollapsed] = React.useState(true); | ||
|
|
||


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.
Uber nit: Feels like these could be grouped together w/ a single
!isUnknownGuide(guide)checkThere 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.
Yep you are right, will update.