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

Extend opacity scale to include all steps of 5 #11832

Merged
merged 2 commits into from Aug 16, 2023

Conversation

adamwathan
Copy link
Member

Originally the opacity scale just included the values 0, 25, 50, 75, and 100. Then we added steps of 10 and we had this weird scale that was basically just steps of 10 but also had 25 and 75. Then we found ourselves wanting a bit more fine-grained control at the extreme ends of the scale and added 5 and 95, and at this point the scale just looked like a total garage sale. But because this was in the pre-JIT days, we lived with it to avoid the file size consequences of extending the scale with all of the 5 values.

The project I'm working on right now requires a 15% value every 15 minutes and I'm sick of typing [15%] so here we are.

@adamwathan adamwathan merged commit 00e73b0 into master Aug 16, 2023
10 checks passed
@adamwathan adamwathan deleted the extended-opacity-scale branch August 16, 2023 15:44
RobinMalfait added a commit that referenced this pull request Oct 9, 2023
By default we use the default config when creating the quick tests for a
given plugin. However, this can result in _a lot_ of changes. For
example, when you update the opacity values, then these values will be
generated for each color, and for each plugin that uses that color.

You can see that behaviour in Adam's PR (#11832).
He added 6 values to the opacity configuration. This resulted in a diff
that looked like this:
```
+219,436 −9
```

This reduces the amount of examples for plugins that generate _a lot_ of
output otherwise.
RobinMalfait added a commit that referenced this pull request Oct 9, 2023
…12170)

* sync package-lock.json

* reduce generated examples

By default we use the default config when creating the quick tests for a
given plugin. However, this can result in _a lot_ of changes. For
example, when you update the opacity values, then these values will be
generated for each color, and for each plugin that uses that color.

You can see that behaviour in Adam's PR (#11832).
He added 6 values to the opacity configuration. This resulted in a diff
that looked like this:
```
+219,436 −9
```

This reduces the amount of examples for plugins that generate _a lot_ of
output otherwise.

* use `toMatchSnapshot`

This way all the `quickPluginTest` and `quickVariantPluginTest`
implementations are the same. This also allows us to update tests after
config changes in an easier way because they use snapshot tests right
now.

* use real colors for reduced red

This will make it a tiny bit easier to debug what's going on if we need
it in the future since it's using the same values as the real colors.
thecrypticace pushed a commit that referenced this pull request Dec 4, 2023
* Extend opacity scale to include all steps of 5

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
thecrypticace pushed a commit that referenced this pull request Dec 5, 2023
* Extend opacity scale to include all steps of 5

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
thecrypticace pushed a commit that referenced this pull request Dec 18, 2023
* Extend opacity scale to include all steps of 5

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
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.

None yet

1 participant