Repository navigation
Conversation
- NcActionInput imports NcPasswordField, NcDateTimePickerNative and lazy NcColorPicker, NcDateTimePicker and NcSelect, but the "New folder" menu only needs a text field - Use NcPopover with NcButton trigger and NcTextField in a form, so Enter and the trailing arrow button submit - Keep the previous layout and spacing of NcActions with NcActionInput (folder icon aligned with the label, same paddings) - Reuse the existing "Create directory" string for the submit button label, no new translations Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2690 +/- ##
=======================================
Coverage 61.74% 61.74%
=======================================
Files 15 15
Lines 481 481
Branches 104 104
=======================================
Hits 297 297
Misses 165 165
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ailing button - Clicking the trailing button calls onSubmit directly and skips the native form validation, so an invalid name was silently ignored - Call reportValidity on the input to show the native validation message, same as on Enter - Close the popover on Escape, as NcPopover only stops the event propagation - Add an accessible name to the dialog - Drop redundant label prop and grid placement rules Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
4764b2f to
6b6e633
Compare
susnux
left a comment
There was a problem hiding this comment.
This seems like the wrong kind of optimization, instead of work around the symptoms the root cause should be fixed.
This is normal usage of the component for exact the use case it is expected to be used.
If there is a performance problem, then this should be fixed in the actions component directly
I'd say it's more a bundling / tree-shaking problem, and specifically this one can't be solved without breaking changes. Under the hood, you will get the same NcPopover and NcTextfield like in this PR, but because of multifunctional nature of NcActions* you will get an extra logic and async chunks on top (color picker, date picker, e.t.c.).
And it may be acceptable for downstream app, but not for the library. IMO here we can and should trade off some complex boilerplate for final size. |
It should not be acceptable anywhere. The component then must be fixed to only use what is needed. I mean I guess for the short term this is "ok" (meaning this PR I guess we can apply!). But this is not a fix, its just bandaid because of broken design of the component underneath. |
Replace NcActionInput with NcPopover + NcTextField
Screenshots:
Net effect (bruteforcesettings app):
js/(no.map/LICENSE)bruteforcesettings-main.jsNcColorPicker/NcDateTimePickerchunks🤖 AI (if applicable)