refactor: Input & DatePicker - Svelte 5 & afterLabel snippet#3479
Open
tegan-temporal wants to merge 6 commits into
Open
refactor: Input & DatePicker - Svelte 5 & afterLabel snippet#3479tegan-temporal wants to merge 6 commits into
tegan-temporal wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| @@ -92,7 +92,7 @@ | |||
| id="advanced-search" | |||
| placeholder={translate('common.query')} | |||
Contributor
There was a problem hiding this comment.
⚠️ Type 'string | null' is not assignable to type 'string | undefined'.
| @@ -107,7 +107,7 @@ | |||
| label={translate('common.workflow-id')} | |||
| labelHidden | |||
Contributor
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| @@ -117,7 +117,7 @@ | |||
| label={translate('common.workflow-type')} | |||
| labelHidden | |||
Contributor
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| value = $bindable(), | ||
| label, | ||
| afterLabel, | ||
| labelHidden = false, |
Contributor
There was a problem hiding this comment.
⚠️ Type 'null' is not assignable to type '"search" | "link" | "success" | "error" | "action" | "activity" | "add-square" | "add" | "apple" | "archives" | "arrow-down" | "arrow-left" | "arrow-up" | "arrow-right" | "ascending" | ... 140 more ... | "xmark-square"'.
|
|
||
| <div class={merge('group flex flex-col gap-1', className)}> | ||
| <Label {required} {label} hidden={labelHidden} for={id} /> | ||
| <div class="flex items-center justify-start gap-2"> |
Contributor
There was a problem hiding this comment.
⚠️ Type 'boolean | null' is not assignable to type 'boolean | undefined'.
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description & motivation 💭
Refactor DatePicker and Input to Svelte 5 syntax AND add a
afterLabelsnippet prop.The point of the refactor is to support tooltips next to the label like this:
The label on inputs no longer has flex-grow on it. I didn't find any cases where it would be an issue... if I didn't remove it, I would have to render the afterLabel snippet inside the
<label>which would be wonky when it comes to click handlers and I wanted to avoid that.Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Requires a follow up Cloud UI PR since the Svelte 5 refactor is breaking: https://github.com/temporalio/cloud-ui/pull/2708
Issue(s)
Related to https://temporalio.atlassian.net/browse/DT-3906
and https://temporalio.atlassian.net/browse/DT-3565