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(FilterBtn): render static/preselected option if only one available #258

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

lorenzocorallo
Copy link
Collaborator

@lorenzocorallo lorenzocorallo commented Aug 21, 2024

if there is only one option available, instead of showing the filter, show a "badge" with the only choice available.
This could happen in a multi-filter situation.
e.g. selecting "Prenotato" in the "Stato" filter would make "Si" the only option available in "Immatricolabile" filter, so we show directly the "Immatricolabile: Si" selected.

image

Notice the difference between the "Stato" filter (dotted with transparent bg => can click and change) and the "Immatricolabile" one (with light bg and no dotted border, title and selected option on the same hierarchy level)

This is a similar behaviour like the course-location multi-select filters: if a course has only one location, we select it and make it "unchangeable" with a similar UI/UX.

image

@github-actions github-actions bot temporarily deployed to preview August 21, 2024 16:31 Destroyed
Copy link
Contributor

github-actions bot commented Aug 21, 2024

Pages Preview
🚀 Deployed preview to https://PoliNetworkOrg.github.io/preview/PoliNetworkOrg/Rankings/pr/258
on branch gh-pages at 2024-08-22 15:28:42 +0000

@angeousta
Copy link
Contributor

conflitti @lorenzocorallo

@github-actions github-actions bot temporarily deployed to preview August 22, 2024 15:26 Destroyed
@angeousta angeousta merged commit 03fadeb into main Aug 22, 2024
3 checks passed
@lorenzocorallo lorenzocorallo deleted the filter-with-one-option branch August 22, 2024 15:33
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.

2 participants