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

Invert opacity setting #379

Merged
merged 7 commits into from
Aug 16, 2024
Merged

Invert opacity setting #379

merged 7 commits into from
Aug 16, 2024

Conversation

Katsute
Copy link
Member

@Katsute Katsute commented Aug 1, 2024

Relevant Issues

List any closed and/or relevant issues

Changes Made

List any changes made.

  • Invert opacity calculation
  • Add option to use old behavior

Release Notes

Going forward, to achieve parity with other background extensions, the opacity calculation will be switched from 0 visible and 1 invisible to 1 visible and 0 invisible.

To use the old behavior, use the useInvertedOpacity option. If you already have an opacity set, the inverted opacity setting will automatically be turned on.

@Katsute Katsute self-assigned this Aug 1, 2024
@Katsute Katsute added the v3 label Aug 1, 2024
@Katsute
Copy link
Member Author

Katsute commented Aug 6, 2024

Use globalState to keep track if the migration process ran.

Use a key like migratedOpacity instead of a generic one as we may want to do more migrations in the future.

Migration logic must exist permanently so users that don't update for a long period still keep their settings.

On first launch:

  • If migrate has not ran:

    • If opacity value exists, turn the inverse opacity flag on
    • If opacity doesn't exist do nothing

    set migrate to true in globalState to indicate this already ran

  • If migrate has run:

    • Do nothing (do not re-migrate)

@Katsute
Copy link
Member Author

Katsute commented Aug 6, 2024

Setting logic from #383 needs to be merged first so we can use it to check if opacity setting is set instead of falling back to the default

@Katsute Katsute marked this pull request as ready for review August 10, 2024 00:53
@Katsute Katsute added this to the M3 milestone Aug 10, 2024
@Katsute
Copy link
Member Author

Katsute commented Aug 15, 2024

On update, VS complains that the manifest doesn't contain the new option, all while it IS using the updated code

Need to test with install/uninstall then new ver

@Katsute
Copy link
Member Author

Katsute commented Aug 16, 2024

✅ Install/Uninstall + VSIX Load passed

@Katsute
Copy link
Member Author

Katsute commented Aug 16, 2024

show notification on migrate

show notification on missing option (vscode bug) - prompt to reload

@Katsute

This comment has been minimized.

Copy link
Contributor

@kdevbot kdevbot bot left a comment

Choose a reason for hiding this comment

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

Approved by @Katsute

@Katsute Katsute changed the title Invert opacity Invert opacity setting Aug 16, 2024
@Katsute Katsute added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit ea3df08 Aug 16, 2024
10 checks passed
@Katsute Katsute deleted the invert-opacity@f080e94 branch August 16, 2024 01:43
@kdevbot kdevbot bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invert opacity setting
1 participant