This component is used at the top of the the Event Listing page that has a filtered search. It will display; what the data is to be filtered by.
Further Discussion
Question: Can we use BlockTag in this dropdown component?
Possible solutions:
CheckBox (Remove checkbox styles and hide the look or make it hidden)
The BlockTag will overlay on top of the checkbox with some CSS tricks. So that the change event happens when user clicks on BlockTag pill.
BlockTag will be used as child component on this page
All the user interactions and the corresponding style changes to blockTag will be handled in this component like hover and when user checks the checkbox with BlockTag pill overlayed
OverView
There will ONLY be two groupings
EVENT TYPE
craft cms field: ftvaEventTypeFilters
@include ftva-subtitle-1;
color: $heading-grey;
SCREENING FORMAT
craft cms field: ftvaScreeningFormatFilters
This component will use MobileDrawer as a child component which wraps the logic for button label and dropdownitems
This component will use the child component BlockTag for the pills
There will be no icon before the label for BlockTag, An SVG component representing the x icon for deselection. (Add a story with x-icon)
[Selected pills are clear, No icon before the label in BlockTag]
Action Item: Add x-icon from design tokens after the label for BlockTag example is provided in developer tips section below
Action Item: Add background and color ftva styles for selected state for BlockTag. An example is provided in the developer tips section below
[Hover behaviors will be blue/white, No icon before the label in BlockTag]
Action Item: The styles for this are similar to selected state without the x-icon example is provided in developer tips section below
DONE button
When the user clicks the done button, this emits an event and passes the selected filters emit function. Check DateFilter for similar emitting event code logic.
CLEAR button Check DateFilter for similar emitting event code logic.
The Filter bar
It will have the filter icon & the carrot icon
What are the design tokens?
It will display how many items have been selected
Write the logic
The carrot icon
will be down when closed
will be up when it is open
Width is dependent on the content space
In tablet view TBD This component acts like a button when clicked and drawer component opens
It overlays on top of what is below
Grouping uses the fieldsets ie: Event Type
We need to add a LEGEND tag
This component gets previously selected filters from URL which already has queryparams like this sample /events/?event.title.keyword=35mm,film&screen.title.keyword=digital,DCP
This dropdown will sync these values as selected state on checkbox/blocktag pills with required styles.
Listing View
Calendar view
When filters are already applied in list view, they remain valid when clicking over to calendar view.
There will ONLY be two groupings
EVENT TYPE
SCREENING FORMAT
Mobile view
This will use the Drawer component to pop up from the bottom
The Drawer component will use a slot where the mobile view of the filters will go.
Props
filterGroups: {
type: Array as PropType<FilterGroupsTypes[]>,
default: () => [],
},
selectedFilters:{ // This is like initialDates prop of DateFilter
type: Object as PropType<SelectedFiltersTypes>,
default: () => {},
}
Component Description
This component is used at the top of the the Event Listing page that has a filtered search. It will display; what the data is to be filtered by.
Further Discussion
Question: Can we use BlockTag in this dropdown component?
OverView
/events/?event.title.keyword=35mm,film&screen.title.keyword=digital,DCP
Listing View
Calendar view
Mobile view
Design
For quick reference.
DESKTOP:
https://www.figma.com/design/EKazRIMP4B15bD16UDbOwR/UCLA-Library-Design-System?node-id=237-7359&node-type=canvas&t=IAIXRJOa9cSjuUke-0
TABLET
To be determined Possibly the List view & Calendar view are only icons
MOBILE:
Apply a Horizontal scroll to the filters https://www.figma.com/file/ZT2qWKTlOxfhr1QUS2rFPL/UI-Pattern-Library-(Client-Facing)-Final?node-id=7%3A58
Slots
The Drawer component will use a slot where the mobile view of the filters will go.
Props
Developer Tips:
Vue SFC Playground link
Sample usage on Nuxt Page:
Sample Data structure for selectedFilters props(This is like initialDates prop of DateFilter)
Component Positioning:
Align the BlockTag component visually in the same place as the hidden checkbox for accessible interaction.
Responsive Design:
Ensure pills are responsive, wrapping onto new lines as necessary on smaller screens.
Accessibility:
Styling Details:
Sample DropDownFilters code
Sample script setup code from VueSFC playground
Sample styles:
Build this component with typescript.
Events
Child components
Components that are used by this new component.
BlockTag
https://ucla-library-storybook.netlify.app/?path=/story/search-block-remove-search-filter--ftva for the pillsResources
Vue 3: Form Input checkbox Accessible Filters
Screenshots
{attach screenshots}