-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(filters): display filter button in data mode #827
Conversation
Badge without number looks fine to me. |
const selectedLanguage = useSelector(languageSelector); | ||
const savedLanguage = localStorage.getItem(config.localStorageLanguageKey); | ||
const [showLanguageBubble, setShowLanguageBubble] = useState<boolean>( | ||
!savedLanguage | ||
); | ||
const selectedTags = useSelector(selectedTagsSelector); | ||
const isFilterActive = selectedTags.length > 0; |
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.
Which filter do you mean?
@@ -34,6 +40,16 @@ const Navigation: FunctionComponent = () => { | |||
icon={StoryIcon} | |||
hideLabelOnMobile | |||
/> | |||
{isFilterActive && ( |
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 would suggest to rename isFilterActive
to isTagFilterActive
or you could also just say selectedTags.length &&
. This makes it easier to understand when the component should be visible.
@@ -65,6 +81,7 @@ const Navigation: FunctionComponent = () => { | |||
<Menu /> | |||
</Overlay> | |||
)} | |||
{isFilterActive && showTags && <TagsBubble selectedTags={selectedTags} />} |
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.
The tag selector is not visible when no tag is selected? How can you select a tag then? Also TagsBubble is not a very specific name, I wasn't sure what this component does when reading it.
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.
The tags are selected in the stories, the user is not supposed to do that in the data view: #823
I added a badge without the number of selected tags. It seemed a bit too small especially with two digits and was very hard to read.
Here is the design: #823 (comment)
What do you think?
closes #823