-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
In the issue #1534 description we have
When I am implementing this change, I realize that whenever |
@@ -108,7 +108,7 @@ function EmbeddedMapConfigWrapper({ user }) { | |||
} else { | |||
createConfig(); | |||
} | |||
}, 500); | |||
}, 1000); |
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.
Update the timeout interval to 1000 ms since this is more practical to finish typing in the text input; 500 ms pause will cause a lag when typing a bit slower
> | ||
Search a Facility Name, OAR ID, or PPE Product Type | ||
</FeatureFlag> | ||
</InputLabel> | ||
<TextField | ||
id={FACILITIES} | ||
placeholder="Facility Name or OAR ID" | ||
placeholder={ |
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.
The placeholder text is the same as the text search label when it is embed mode and not default text.
90f667b
to
af993dc
Compare
errors={errors} | ||
/> | ||
<EmbeddedMapSearchLabelConfig | ||
anyFieldSearchable={fields.some( |
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.
For the search label input component, it only cares about if any field is searchable
Taking a look now |
I think it's fine that we're managing the change to default text on the UI only, as it allows us to have a single source of truth for the default text. |
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.
As a whole this is working very well. The search text label change in embed config is being applied smoothly and consistently.
I found a couple of anomalies as I was testing the search input:
- The initial content of the text input is blank, but is updated when I click into it. You might be able to fix that by replacing empty text with the DEFAULT_SEARCH_TEXT here. The downside of that approach is that if they leave the field blank long enough that it auto-saves, the text will get replaced with the default value. You could work around that by preventing autosaving the embed config while the textbox is blank (and only saving a blank field / replacing the text on blur). Let me know if you'd like to pair on that approach.
- When I enter multiple spaces, then click away from the textbox, it stays blank; however, if I click back into the box and then click out again without changing anything, it is replaced with the default text. I suggest using
.trim()
on the text when you check to see if the field is blank.
I'm not sure about the descriptive content, so I've tagged @lederer for review to give this a look over as well.
This is neat. Thanks for putting this together. I left some comments. Currently if no "searchable" checboxes are checked, the input is disabled. This is good! Can you also make the entire subsection grayed out? Maybe just set the opacity of it to, say, 60%. |
1bc5680
to
423e731
Compare
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.
Thanks for making those changes. Few more tweaks requested in some code comments. Almost there!
I made the changes accordingly. Please take another look, thank you! |
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.
Great job working through those changes! The fix for the default text onChange vs onBlur issue was surprisingly complicated to resolve, but you did a good job working through it.
Thank you both for reviewing! |
Update embedded map UI to add a "Text search label" and update search sidebar UI to show custom label which is set on the EmbedConfig
c3fcb2f
to
7d88f4a
Compare
Overview
Update embedded map UI to add a "Text search label" and search sidebar UI to show custom label which is set on the
EmbedConfig
Connects #1534
Demo
Embed Config page
Embedded Map
Testing Instructions
./scripts/server
and log in as any users with embed permissions (e.g. c2@example.com)Checklist
fixup!
commits have been squashed