Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Prevent File Upload description from triggering file selection modal #7433

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented Jul 3, 2024

Resolves GIVE-820

Description

The File Upload template is entirely clickable, triggering the file selection modal. This issue is caused by a label element wrapping the entire component. This pull request changes it by unwrapping the label element, keeping it only around the label text while still allowing it to trigger the file selection modal. The difference is that now, clicking the description text will not activate the modal, making this template consistent with how other fields behave.

Affects

File input template

Visuals

https://github.com/impress-org/givewp/assets/3921017/2e66c450-23a0-448c-99b1-df4b175dd8b0
Clicking the input, then the label, the description

Testing Instructions

Make sure the input field works just like before, except it will not trigger the file selection modal when clicking on the description text.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@pauloiankoski pauloiankoski requested a review from jdghinson July 3, 2024 22:33
Copy link
Contributor

@jdghinson jdghinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!👍

Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed manual QA tests.

@pauloiankoski pauloiankoski merged commit c86d20a into develop Jul 9, 2024
20 checks passed
@pauloiankoski pauloiankoski deleted the refactor/file-upload-clickable-area branch July 9, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants