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

[CL-508] extension width setting #12040

Merged
merged 8 commits into from
Nov 25, 2024
Merged

Conversation

willmartian
Copy link
Contributor

@willmartian willmartian commented Nov 18, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/CL-508

📔 Objective

Adds an setting to the extension for configuring the popup's width. 🚀

📸 Screenshots

Screen.Recording.2024-11-18.at.2.02.56.PM.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@willmartian willmartian changed the base branch from main to ds/cl-499/item-group-compact-mode November 18, 2024 16:42
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details837521b4-c5b8-4cfb-8b32-22bc76366c4a

New Issues

Severity Issue Source File / Package Checkmarx Insight
LOW Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 40 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
LOW Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 47

@willmartian willmartian marked this pull request as ready for review November 18, 2024 19:08
@willmartian willmartian requested review from a team as code owners November 18, 2024 19:08
@willmartian
Copy link
Contributor Author

willmartian commented Nov 18, 2024

Whoops, let me fix those broken tests.

edit: fixed in b8ee6a0

@willmartian willmartian force-pushed the ds/CL-508/popup-width-beeep branch from 3b6b767 to b8ee6a0 Compare November 18, 2024 19:18
@willmartian willmartian requested review from a team and dani-garcia and removed request for a team and dani-garcia November 18, 2024 19:24
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 42.10526% with 22 lines in your changes missing coverage. Please review.

Project coverage is 33.47%. Comparing base (a07b072) to head (6f1f799).
Report is 66 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...r/src/platform/popup/layout/popup-width.service.ts 36.84% 12 Missing ⚠️
apps/browser/src/popup/app.component.ts 0.00% 3 Missing ⚠️
.../src/platform/popup/layout/popup-layout.stories.ts 0.00% 2 Missing ⚠️
apps/browser/src/popup/main.ts 0.00% 2 Missing ⚠️
...rc/vault/popup/settings/appearance-v2.component.ts 77.77% 2 Missing ⚠️
libs/components/src/select/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12040      +/-   ##
==========================================
- Coverage   33.48%   33.47%   -0.01%     
==========================================
  Files        2851     2876      +25     
  Lines       89283    89871     +588     
  Branches    17008    17104      +96     
==========================================
+ Hits        29900    30088     +188     
- Misses      57029    57407     +378     
- Partials     2354     2376      +22     

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

Copy link
Contributor

@vleague2 vleague2 left a comment

Choose a reason for hiding this comment

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

Do we want to have some stories of the popup layout at different widths?

Base automatically changed from ds/cl-499/item-group-compact-mode to main November 18, 2024 21:35
@willmartian willmartian requested a review from a team as a code owner November 18, 2024 21:35
@willmartian willmartian marked this pull request as draft November 18, 2024 21:45
Copy link
Member

@danielleflinn danielleflinn left a comment

Choose a reason for hiding this comment

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

Feedback from DS team call:

  • Lets update the field label to "Extension width"
  • Lets update the behavior so when the extension is popped out the popout's width defaults to the same as the "Extension width" setting.

@willmartian
Copy link
Contributor Author

willmartian commented Nov 18, 2024

Lets update the field label to "Extension width"

e56bb8a

Lets update the behavior so when the extension is popped out the popout's width defaults to the same as the "Extension width" setting.

ffd8820

@willmartian willmartian force-pushed the ds/CL-508/popup-width-beeep branch from fe47454 to 88d536f Compare November 18, 2024 23:27
@willmartian willmartian force-pushed the ds/CL-508/popup-width-beeep branch from 88d536f to 5573a86 Compare November 18, 2024 23:31
@willmartian
Copy link
Contributor Author

Do we want to have some stories of the popup layout at different widths?

5573a86

@willmartian willmartian requested a review from vleague2 November 18, 2024 23:32
vleague2
vleague2 previously approved these changes Nov 19, 2024
gbubemismith
gbubemismith previously approved these changes Nov 20, 2024
type PopupWidthOptions = typeof PopupWidthOptions;
export type PopupWidthOption = keyof PopupWidthOptions;

const POPUP_WIDTH_KEY_DEF = new KeyDefinition<PopupWidthOption>(THEMING_DISK, "popup-width", {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@justindbaur When is it appropriate to share state definitions? Width is semantically related to theming, and it feels like we aren't meant to create a new state definition for every little piece of state, right? (Otherwise, why have key definitions at all?)

Copy link
Member

Choose a reason for hiding this comment

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

If you have similar things you can share them but one of the important rules is you shouldn't share them between teams and most likely shouldn't share them to "far" away from each other. Because the problem you could run into is someone else makes a key with the same name within a state definition that someone else does. So I think since this would be in DS ownership it should use its own state definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Boom: 0fc38b9 (thanks)

@willmartian willmartian requested review from danielleflinn, vleague2 and gbubemismith and removed request for danielleflinn November 22, 2024 16:04
@willmartian willmartian requested a review from vleague2 November 22, 2024 21:29
vleague2
vleague2 previously approved these changes Nov 22, 2024
gbubemismith
gbubemismith previously approved these changes Nov 25, 2024
justindbaur
justindbaur previously approved these changes Nov 25, 2024
Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

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

Just one optional comment but otherwise looks good.

libs/common/src/platform/state/state-definitions.ts Outdated Show resolved Hide resolved
@willmartian willmartian merged commit bb09121 into main Nov 25, 2024
69 of 72 checks passed
@willmartian willmartian deleted the ds/CL-508/popup-width-beeep branch November 25, 2024 19:43
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.

5 participants