Skip to content

Add fit-content size to support large modal content#3502

Merged
Simrayz merged 2 commits intomasterfrom
chore/support-larger-modal-content
Sep 4, 2025
Merged

Add fit-content size to support large modal content#3502
Simrayz merged 2 commits intomasterfrom
chore/support-larger-modal-content

Conversation

@Simrayz
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz commented Sep 3, 2025

Scope and purpose

This PR adds a new size option to modals, fit-content, which allows modals to grow as wide as they need.

As an example, this is necessary to support a wider "Add widget" modal on the dashboard, as demonstrated in #3487.
See provided screenshot for the effect this change would have.

This pull request

  • Adds new modal size, fit-content, to support larger content
  • Sets fit-content as default modal size (was tiny)
  • Updates existing add/remove patch modals with explicit "tiny" size

Screenshots

With the new default (.fit-content), the "Add widget" modal would look like this:
Screenshot 2025-09-03 at 16 31 00

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • This pull request is based on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

@Simrayz Simrayz self-assigned this Sep 3, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Test results

   12 files     12 suites   12m 23s ⏱️
2 400 tests 2 400 ✅ 0 💤 0 ❌
6 735 runs  6 735 ✅ 0 💤 0 ❌

Results for commit 883f98d.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.22%. Comparing base (07faabd) to head (883f98d).
⚠️ Report is 340 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3502   +/-   ##
=======================================
  Coverage   61.22%   61.22%           
=======================================
  Files         611      611           
  Lines       44754    44754           
  Branches       43       43           
=======================================
  Hits        27402    27402           
  Misses      17342    17342           
  Partials       10       10           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Simrayz Simrayz force-pushed the chore/support-larger-modal-content branch from 780aca7 to 883f98d Compare September 4, 2025 07:27
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 4, 2025

@Simrayz Simrayz marked this pull request as ready for review September 4, 2025 07:35
@Simrayz Simrayz requested a review from a team September 4, 2025 07:35
@Simrayz Simrayz mentioned this pull request Sep 4, 2025
9 tasks
@Simrayz Simrayz merged commit 6017aa5 into master Sep 4, 2025
17 checks passed
@Simrayz Simrayz deleted the chore/support-larger-modal-content branch September 4, 2025 10:29
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