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

Remove transitionary "type" property on masks #2050

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

Vinnl
Copy link
Collaborator

@Vinnl Vinnl commented Jun 7, 2022

This property was preserved to allow for a transitory period in
which people were still using an older add-on version that did not
preserve the API's equivalent mask_type property. But now that
pretty much everyone has the newer add-on version, we no longer
need the redundant type property:

image

This is the (independent) sister PR to mozilla/fx-private-relay-add-on#361, and a follow-up to #1990.

Screenshot (if applicable)

Not applicable.

How to test

There should be no changed behaviour compared to main, especially with server-side label storage turned off.

Checklist

  • l10n dependencies have been merged, if any.
  • All acceptance criteria are met.
  • I've added or updated relevant docs in the docs/ directory.
  • All UI revisions follow the coding standards, and use Protocol tokens where applicable (see /static/scss/libs/protocol/css/includes/tokens/dist/index.scss).
  • Commits in this PR are minimal and have descriptive commit messages.

Copy link
Contributor

@maxxcrawford maxxcrawford left a comment

Choose a reason for hiding this comment

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

Nice clean-up!

@@ -3,8 +3,6 @@ import { useAddonData } from "./addon";
import { AliasData, isRandomAlias } from "./api/aliases";

export type LocalLabel = {
/** `type` is to allow for a transition period while people migrate to a new add-on version that uses `mask_type` */
type: "random" | "custom";
mask_type: "random" | "custom";
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion/enhancement (nit): Can you include a comment on what these two types mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep! b497665

This property was preserved to allow for a transitory period in
which people were still using an older add-on version that did not
preserve the API's equivalent `mask_type` property. But now that
pretty much everyone has the newer add-on version, we no longer
need the redundant `type` property.
@Vinnl Vinnl force-pushed the remove-alias-type branch from b497665 to 39bb289 Compare June 9, 2022 11:25
@Vinnl Vinnl merged commit 302b144 into main Jun 9, 2022
@Vinnl Vinnl deleted the remove-alias-type branch June 9, 2022 11:35
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