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

Prevent empty <ul> from being rendered in profile.html #695

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

DanielSwain
Copy link
Contributor

@DanielSwain DanielSwain commented Jan 17, 2024

Description

An empty <ul> was being rendered when backup_phones == None. Whitespace was also being rendered between the <ul></ul>.

Motivation and Context

The rendered element causes extra space to appear in the DOM at http://127.0.0.1:8000/account/two_factor/ before the "Add Phone Number" button when no backup phones have been registered.

How Has This Been Tested?

Tested locally at http://127.0.0.1:8000/account/two_factor/. An empty <ul></ul> is no longer rendered when navigating to this url prior to adding any backup phone numbers.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Empty <ul> was being rendered when backup_phones == None
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e9dba63) 95.52% compared to head (87f9680) 95.52%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #695   +/-   ##
=======================================
  Coverage   95.52%   95.52%           
=======================================
  Files          78       78           
  Lines        3354     3354           
  Branches      377      377           
=======================================
  Hits         3204     3204           
  Misses        119      119           
  Partials       31       31           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@claudep claudep merged commit 45cfc13 into jazzband:master Jan 17, 2024
8 checks passed
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.

2 participants