Commit 63c7781
authored
fix: postman attachments selector (#1101)
## Problem
* Postman attachment input height shifts when changing from empty state
to selecting an attachment.
* Attachment tag keys are not unique when using default field name and
default attachment from mock data.
## Solution
* Increased the minHeight for the input so that it remains the same
height regardless of whether an attachment was selected.
* Added the index to the key to de-duplicate attachments particularly
when using mock data and default field name.
## Tests
- [ ] Attachments from FormSG can be selected and added to the email
- [ ] Attachments can have the same field name and filename from FormSG
(especially from mock data) and does not create duplicate Tags in the
input field
- [ ] Attachments can be uploaded at the Postman step and added to the
email
- [ ] Height of selector does not change when selecting / de-selecting
attachment
## Before & After Screenshots
**BEFORE**:
https://github.com/user-attachments/assets/7192662f-1b65-4451-81dd-8f8a21778a58
**AFTER**:
https://github.com/user-attachments/assets/3614b9d0-01d7-45b1-acd5-a8c86d3b6d911 parent 251d862 commit 63c7781
File tree
2 files changed
+3
-3
lines changed- packages/frontend/src/components/AttachmentSuggestions
- components
2 files changed
+3
-3
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments