issue-236-fixed #239

Merged
y merged 4 commits from issue-236-fixed into staging 2024-11-04 07:43:58 +00:00
Owner

Issue

Closes #236

Intent

  • Hide signers dropdown on ESC key press.

Implementation

  • Added onClose handler to signers dropdown at src/components/DrawPDFFields/index.tsx.
  • Added KeyboardCode enum to src/types/event.ts.
## Issue Closes #236 ## Intent - Hide signers dropdown on ESC key press. ## Implementation - Added `onClose` handler to signers dropdown at `src/components/DrawPDFFields/index.tsx`. - Added `KeyboardCode` enum to `src/types/event.ts`.
y added 2 commits 2024-11-01 08:24:04 +00:00
chore(types): used KeyboardCode enum
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 31s
3a94fbc0ae
y requested review from enes 2024-11-01 08:24:44 +00:00
enes requested changes 2024-11-01 08:49:06 +00:00
Dismissed
enes left a comment
Member

We don't have a way to bring back the dropdown, I think we should have that option, possibly when clicking the mark again and making it active in handleDrawnFieldPointerDown

    setHideSignersForDrawnField((prev) => ({
      ...prev,
      [drawnFieldIndex]: false
    }))

And on the usability side, I hoped I could press ESC anywhere to hide it without having to select dropdown first, maybe just a onKeyDown (with tabIndex={0} ) on root of the drawn field rectangle div instead of onClose on dropdown.

 {page.drawnFields.map((drawnField, drawnFieldIndex: number) => {
                return (
                  <div
                    key={drawnFieldIndex}
                    className={styles.drawingRectangle}
                    tabIndex={0}
                    onKeyDown={(event: React.SyntheticEvent) => {
...

We don't have a way to bring back the dropdown, I think we should have that option, possibly when clicking the mark again and making it active in `handleDrawnFieldPointerDown ` ``` setHideSignersForDrawnField((prev) => ({ ...prev, [drawnFieldIndex]: false })) ``` And on the usability side, I hoped I could press ESC anywhere to hide it without having to select dropdown first, maybe just a `onKeyDown` (with `tabIndex={0}` ) on root of the drawn field rectangle div instead of `onClose` on dropdown. ``` {page.drawnFields.map((drawnField, drawnFieldIndex: number) => { return ( <div key={drawnFieldIndex} className={styles.drawingRectangle} tabIndex={0} onKeyDown={(event: React.SyntheticEvent) => { ...
Author
Owner

We don't have a way to bring back the dropdown, I think we should have that option, possibly when clicking the mark again and making it active in handleDrawnFieldPointerDown

    setHideSignersForDrawnField((prev) => ({
      ...prev,
      [drawnFieldIndex]: false
    }))

And on the usability side, I hoped I could press ESC anywhere to hide it without having to select dropdown first, maybe just a onKeyDown (with tabIndex={0} ) on root of the drawn field rectangle div instead of onClose on dropdown.

 {page.drawnFields.map((drawnField, drawnFieldIndex: number) => {
                return (
                  <div
                    key={drawnFieldIndex}
                    className={styles.drawingRectangle}
                    tabIndex={0}
                    onKeyDown={(event: React.SyntheticEvent) => {
...


good suggestions!
thanks, @enes !

> We don't have a way to bring back the dropdown, I think we should have that option, possibly when clicking the mark again and making it active in `handleDrawnFieldPointerDown ` > > ``` > setHideSignersForDrawnField((prev) => ({ > ...prev, > [drawnFieldIndex]: false > })) > ``` > > And on the usability side, I hoped I could press ESC anywhere to hide it without having to select dropdown first, maybe just a `onKeyDown` (with `tabIndex={0}` ) on root of the drawn field rectangle div instead of `onClose` on dropdown. > > ``` > {page.drawnFields.map((drawnField, drawnFieldIndex: number) => { > return ( > <div > key={drawnFieldIndex} > className={styles.drawingRectangle} > tabIndex={0} > onKeyDown={(event: React.SyntheticEvent) => { > ... > > good suggestions! thanks, @enes !
y added 1 commit 2024-11-01 14:00:55 +00:00
feat(signers-dropdown): improved hiding/displaying logic
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 31s
76b1fa792c
enes approved these changes 2024-11-01 14:14:34 +00:00
y added 1 commit 2024-11-04 07:43:04 +00:00
chore: added handleEscapeButtonDown description
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 35s
5b1654c341
y merged commit 4cb6f07a68 into staging 2024-11-04 07:43:58 +00:00
y deleted branch issue-236-fixed 2024-11-04 07:43:59 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sigit/sigit.io#239
No description provided.