1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00
Andreas Coroiu 90b7197279 [PM-20210] Expand badge API (#14801)
* feat: scaffold new badge service structure

* feat: add state override

* feat: add priority-based override

* feat: implement state clearing

* feat: add docs to badge service functions

* feat: add support for setting icon

* feat: implement unsetting

* feat: implement setting text

* feat: add support for setting background

* fix: default icon

* feat: clean up old update-badge

* feat: save state using StateProvider

* feat: migrate auth status badge updating

* feat: migrate autofill badge updating

* fix: auto set to default values

* chore: woops, clean up copy-pasta

* fix: lint and types

* chore: nit updates from PR review

* feat: remove ability to send in arbitrary icons

* feat: move init to separate function

* fix: wrong import

* fix: typing issues

* fix: try again to fix typing issues

* feat: scaffold tests for new tabId-specific states

* feat: add diffence util function

* feat: add support for limiting state to tabId

* feat: re-implement autofill badge updater to only update when a tab actually changes

* feat[wip]: always set all tabs when changing the general state

* feat[wip]: implement general states for mutliple open tabs

* feat[wip]: implement fully working multi-tab functionality

* feat: optimize api calls

* feat: adjust storage

* chore: clean up old code

* chore: remove unused log service

* chore: minor tweaks

* fix: types

* fix: race condition causing wrong icon on startup

The service assumes that the first emission from the state will be an empty one and discards it
(techincally it just doesn't act on it because pairwise requires a minimum two emissions). This
caused issues when a service is able to update the state before the observable got a change to
properly initialize. To fix this we simply force an empty emission before anything else,
that way we will always react to the emission from the state provider (because that would end up
being the second emission). We then use distinctUntilChanged to avoid unecessarily acting on
an empty state.
2025-07-09 15:38:33 -04:00
2024-01-30 06:50:54 -08:00
2025-07-09 15:38:33 -04:00
2025-07-09 15:38:33 -04:00
2021-12-21 15:43:35 +01:00
2025-04-07 21:20:45 +00:00
2022-03-15 15:39:14 -04:00

Bitwarden

GitHub Workflow browser build on main GitHub Workflow CLI build on main GitHub Workflow desktop build on main GitHub Workflow web build on main gitter chat


Bitwarden Client Applications

This repository houses all Bitwarden client applications except the mobile applications (iOS | android).

Please refer to the Clients section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.

We're Hiring!

Interested in contributing in a big way? Consider joining our team! We're hiring for many positions. Please take a look at our Careers page to see what opportunities are currently open as well as what it's like to work at Bitwarden.

Contribute

Code contributions are welcome! Please commit any pull requests against the main branch. Learn more about how to contribute by reading the Contributing Guidelines. Check out the Contributing Documentation for how to get started with your first contribution.

Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the SECURITY.md file.

Description
No description provided
Readme 1.1 GiB
Languages
TypeScript 81.8%
HTML 12.6%
SCSS 2.3%
JavaScript 1.6%
MDX 0.9%
Other 0.7%