You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataViews: Hide "Add filter" link if there are no filters to add #64689
The Add filter link should only show when there is another filter to add. Currently it shows when there's only one filter and it's already been added. It's not clickable.
The Add filter link should only show when there is another filter to add.
I agree with this. If there's one filter, there's never an opportunity for the "add filter" to become enabled.
When there are multiple filters and they've all been added, the Add filter link still shows
This case is different, though.
You cannot add more filters when you've added all of them, but the button becomes active as soon as you remove one. In this scenario the disabled/enabled states are more representative, IMO. It'll be a confusing experience to having buttons coming in/out on the screen.
Additionally, we need to pay attention to the keyboard affordances: notice how the "add filter" button gains focus when the last filter is removed:
You cannot add more filters when you've added all of them, but the button becomes active as soon as you remove one. In this scenario the disabled/enabled states are more representative, IMO. It'll be a confusing experience to having buttons coming in/out on the screen.
Additionally, we need to pay attention to the keyboard affordances: notice how the "add filter" button gains focus when the last filter is removed:
@oandregal Thanks, this was really helpful to see! I agree and I'll update the issue.
I think the only time the button should be hidden entirely is when the data view only supplies primary filters. Primary filters are always visible in the UI (even if a value is not selected). In these cases it's not possible to add more filters, so there's no benefit to showing the button.
An example of this is the Patterns page, which supplies a single "Sync status" filter which is primary. Consequently there's no visible "Add filter" button.
Activity
oandregal commentedon Aug 21, 2024
Hi @allilevine thanks for the report.
I agree with this. If there's one filter, there's never an opportunity for the "add filter" to become enabled.
This case is different, though.
You cannot add more filters when you've added all of them, but the button becomes active as soon as you remove one. In this scenario the disabled/enabled states are more representative, IMO. It'll be a confusing experience to having buttons coming in/out on the screen.
Additionally, we need to pay attention to the keyboard affordances: notice how the "add filter" button gains focus when the last filter is removed:
Gravacao.do.ecra.2024-08-21.as.22.01.18.mov
oandregal commentedon Aug 21, 2024
sorry, clicked the wrong button when commenting :)
allilevine commentedon Aug 21, 2024
@oandregal Thanks, this was really helpful to see! I agree and I'll update the issue.
jameskoster commentedon Aug 22, 2024
I think the only time the button should be hidden entirely is when the data view only supplies primary filters. Primary filters are always visible in the UI (even if a value is not selected). In these cases it's not possible to add more filters, so there's no benefit to showing the button.
An example of this is the Patterns page, which supplies a single "Sync status" filter which is primary. Consequently there's no visible "Add filter" button.
Therefore we can probably close this issue?