Conversation
cb759ce to
5e2c3a3
Compare
b3fa438 to
3f4d535
Compare
3f4d535 to
9f0faad
Compare
69b458f to
d2ebfd6
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4107 +/- ##
==========================================
- Coverage 97.44% 96.66% -0.78%
==========================================
Files 903 919 +16
Lines 26510 29007 +2497
Branches 9569 10491 +922
==========================================
+ Hits 25832 28041 +2209
- Misses 672 960 +288
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b1c71c6 to
6ec9bce
Compare
d7e193a to
7c9cae2
Compare
… firing on each keystroke after a trigger was cancelled
…its to trigger and plain text, enter key does nothing on empty state instead of submitting
3d5686c to
992d693
Compare
| const finalCursorPosition = caretEnd ?? insertPosition + text.length; | ||
| textarea.setSelectionRange(finalCursorPosition, finalCursorPosition); | ||
|
|
||
| textarea.dispatchEvent(new Event('input', { bubbles: true })); |
There was a problem hiding this comment.
What is the purpose of this dispatch event?
There was a problem hiding this comment.
Should we even necessarily support handleInsertText for textarea mode?
There was a problem hiding this comment.
The event is to trigger the change of events that typically happen when a user types text into the input. I'm inclined to support it for textarea as well even if it doesn't really get used as the function is on the ref for both textarea and token-mode. It doesn't hurt to have it work for both in my opinion
There was a problem hiding this comment.
But how does it help consumers? Is it captured by our code to make some change or do we expect it to be caught by the consumer code? If so - we should rather expose our non-cancelable on-input event via a dedicated handler.
| "i18nStrings.datePlaceholder": "GG/MM/AAAA", | ||
| "i18nStrings.isoDatePlaceholder": "AAAA-MM-GG", | ||
| "i18nStrings.slashedDatePlaceholder": "AAAA/MM/GG", | ||
| "i18nStrings.isoDatePlaceholder": "GG-MM-AAAA", |
There was a problem hiding this comment.
These two strings should not change. Instead, i18nStrings.datePlaceholder should be changed to AAAA/MM/GG
| "i18nStrings.datePlaceholder": "JJ/MM/AAAA", | ||
| "i18nStrings.isoDatePlaceholder": "AAAA-MM-JJ", | ||
| "i18nStrings.slashedDatePlaceholder": "AAAA/MM/JJ", | ||
| "i18nStrings.isoDatePlaceholder": "JJ-MM-AAAA", |
There was a problem hiding this comment.
Same as in Italian, these two strings should not have been change, it is the previous one that was wrong.
We can address existing issues separately but let's not introduce regressions.
| "i18nStrings.datePlaceholder": "DD/MM/YYYY", | ||
| "i18nStrings.isoDatePlaceholder": "YYYY-MM-DD", | ||
| "i18nStrings.slashedDatePlaceholder": "YYYY/MM/DD", | ||
| "i18nStrings.isoDatePlaceholder": "DD-MM-YYYY", |
There was a problem hiding this comment.
Similar feedback here as with French and Italian below
…ng out of use-token-mode, remove ignoreCursorDetection flag
| const menuOpen = props.getMenuOpen(); | ||
|
|
||
| handleKey( | ||
| event as unknown as { |
There was a problem hiding this comment.
Why is this double cast necessary?
There was a problem hiding this comment.
Good catch, it's not needed at all, will remove in the next commit
Description
Adds shortcuts features to PromptInput:
divwith contenteditable enabled to allow rendering custom elements@or/Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.