-
Notifications
You must be signed in to change notification settings - Fork 71
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
add filtering to api pagination #2130
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -52,6 +57,10 @@ | |||
export let itemsKeyname = 'items'; | |||
export let previousButtonLabel: string; | |||
export let nextButtonLabel: string; | |||
export let filterable = false; | |||
export let filterInputLabel: string = undefined; |
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.
What do you think about making this ⬇️ instead?
export let filterInputLabel: string = undefined; | |
export let filterInputPlaceholder: string = undefined; |
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 could be talked into just using placeholder
to keep it inline with HTML.
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.
<ApiPagination placeholder="whatever" />
doesn't make a ton of sense, cause it's not clear what the placeholder is for. I'll go with Laura's suggesiton.
@@ -29,11 +31,14 @@ | |||
itemsKeyname?: string; | |||
previousButtonLabel: string; | |||
nextButtonLabel: string; | |||
filterable?: boolean | undefined; | |||
filterInputLabel?: string | undefined; |
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.
Since the input only shows up if filterable && filterInputLabel
, can we make filterInputLabel
required if filterable
is true
?
@@ -29,11 +31,14 @@ | |||
itemsKeyname?: string; | |||
previousButtonLabel: string; | |||
nextButtonLabel: string; | |||
filterable?: boolean | undefined; |
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.
We should replace the custom input on the Schedules page ⬇️ with this prop 🎉
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.
We should, I can make a follow up task for that
{/if} | ||
{#if filterable && filterInputLabel} | ||
<Input | ||
id="api-pagination-search-input" |
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.
Do we want a search icon here, similar to our other "search" inputs?
id="api-pagination-search-input" | |
icon="search" | |
id="api-pagination-search-input" |
* Add config and command to run local temporal server, remove versioning on workflow worker tab, add link to task queue, add tabs for workers/versioning on task queue page. Add view all assignment rules row * send resetType in request body for batch reset (#2110) * send resetType in req body for batch reset for compatibility with older server/api versions * default reset type to first, clear up reason hint text * 2.27.4 (#2111) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * remove import from protos, use custom enum (#2112) * 2.27.5 (#2113) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * Remove copyable tooltip (#2114) * Fix issue where close button cannot be seen on dark drawers (#2115) * Fix issue where close button cannot be seen on dark drawers * Update drawer.stories.svelte * Update drawer.stories.svelte * DT-2159 - fix "Reapply Signals" checkbox on reset workflow confirmation form (#2117) * use binding instead of on:change for reset reapply checkbox * add regression integration test * Night mode audit (#2118) * Update and consolidate surface colors * Update text colors * Update border colors * Update shadow colors * Remove unnecessary colors * Fix box shadow color * Use ring instead of box shadow * Update WorkflowStatus colors * Fix simple TableHeaderRow * Input updates based on designs * Fix table headers and various text and bg colors * Update button styles to match designs * Remove disabled color variables, update placeholder text and update Pill component * Update checkbox and radio input * Update toggle switch * Update IconButton to use Button component * Remove unnecessary badge background * Update Toast component colors * Update snaps and fix errors * Remove unnecessary surface-input * Update page background color to match designs * Update timeline background and text color * Remove underline on button links * Remove ternary and use and instead for active class * Delete snapshot tests * Kebab case colors * Keep Button border as 2px on focus * Add caret-danger to plugin * 2.27.6 (#2122) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * Add local-temporal command (#2120) * Update SideNavigation component (#2124) * Update side nav focus styles * Update heart beat indicator color * Update version.go to v2.27.2 (#2126) * Link to namespace in Namespace sticky nav (#2123) * Add href prop to combobox for link button * Subtle border, better path, disable link if no namespace * add docs to side nav (#2131) * add filtering to api pagination (#2130) * DT-2179 - fix wf reset button & other fixes (#2133) * missed PR feedback - fix ApiPagination prop typing and name - add search icon to input in ApiPagination * fix workflow reset button disabled logic * move docs link * use cloud guard * Add timezoneName to schedule spec with default of UTC (#2127) * Add timezoneName to schedule spec with default of UTC * Use translate for timezones * Set input on edit * Add onDecode prop * 2.27.7 (#2134) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * Audit a11y issues (#2135) * DT-2134 Fix a11y issues with accordion.svelte * Remove on:keydown on CodeBlock I could not find a single use of `CodeBlock` that had an on:keydown event. [Related ticket](https://temporalio.atlassian.net/browse/DT-2135). * Update filter-or-copy-buttons.svelte These both appear to be `noop` functions? * clean up workflow actions (#2136) * clean up workflow actions * better i18n string name * fix batch action checks * fix tests * add integration tests * 2.27.8 (#2137) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * Update workflow status colors (#2132) * Update running color * Update scheduled color * Update completed and open color * Update new and initiated color * Use globalThis.accessToken() for codec server calls (#2138) * Fix api pagination alignment, add debounce as a prop (#2139) * fix alignment of api pagination slots * fix * fix slot check * add debounce as a prop * spelling * fix debounce * remove loading slot prop * 2.27.9 (#2140) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * Fix header colors * Update snaps? * Remove commented out mock, better check for rules * Remove dup .env --------- Co-authored-by: Ross Edfort <rossedfort@gmail.com> Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> Co-authored-by: Steve Kinney <hello@stevekinney.net> Co-authored-by: Laura Whitaker <laura.whitaker@temporal.io> Co-authored-by: Grace Iris Gardner <42048868+GraceGardner@users.noreply.github.com>
Description & motivation 💭
filterable
prop to<ApiPagination />
if present, will render an Input. The input is debounced and will refetch items after 1 second using the existingonFetch
prop. Extends thePaginatedRequest
type to take an optionalquery
field, which can be used by callersScreenshots (if applicable) 📸
Screen.Recording.2024-05-31.at.9.23.41.AM.mov
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?