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

Fix: unnecessary space on required form field label #2037

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

angela-tran
Copy link
Member

Fixes #2033

djlint was re-formatting the HTML to put the label element on separate lines. However, this caused there to be whitespace surrounding the text for the field label.

This PR disables djlint for the form's label elements and removes the whitespace. See djlint docs on ignoring code.

The built-in spaceless tag from Django was close to what we needed except that it doesn't remove whitespace between tags and text.

whitespace around the tag contents was causing the issue
@angela-tran angela-tran self-assigned this Apr 17, 2024
@angela-tran angela-tran requested a review from a team as a code owner April 17, 2024 23:09
@github-actions github-actions bot added front-end HTML/CSS/JavaScript and Django templates deployment-dev [auto] Changes that will trigger a deploy if merged to dev and removed front-end HTML/CSS/JavaScript and Django templates labels Apr 17, 2024
Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

@angela-tran angela-tran merged commit 803e14c into dev Apr 18, 2024
11 checks passed
@angela-tran angela-tran deleted the fix/required-field-label branch April 18, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eligibility confirm: unnecessary space between field label and "required" indicator
2 participants