Skip to content
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

Merged
merged 5 commits into from
Jan 25, 2021
Merged

Conversation

KatvonRivia
Copy link
Member

@KatvonRivia KatvonRivia commented Jan 19, 2021

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.

image

Here is the design: #823 (comment)

What do you think?

closes #823

@KatvonRivia KatvonRivia requested a review from pwambach January 19, 2021 16:10
@pmast
Copy link
Member

pmast commented Jan 20, 2021

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;
Copy link
Contributor

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 && (
Copy link
Contributor

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} />}
Copy link
Contributor

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.

Copy link
Member Author

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

@KatvonRivia KatvonRivia requested a review from pwambach January 25, 2021 14:15
@KatvonRivia KatvonRivia merged commit 6a7fac2 into develop Jan 25, 2021
@KatvonRivia KatvonRivia deleted the feat/filter branch January 25, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply tag filter to globe view
3 participants