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

docs: Fix actual typos that made into our dictionary #2305

Merged
merged 3 commits into from
Jan 28, 2023

Conversation

luanpotter
Copy link
Member

Description

I am on a crusade to improve our spellchecking. I have a big PR that I am now going to break down into very small chunks to for review.

This one I am fixing actual typos that made it despite our current settings. Hopefully this one won't be controversial (yet).

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

@@ -771,7 +771,7 @@ following effects qualify: [`MoveByEffect`](#movebyeffect), [`MoveToEffect`](#mo
[`RotateEffect.to`](#rotateeffectto).

The parameter `speed` is in units per second, where the notion of a "unit" depends on the target
effect. For example, for move effects, they refer to the distance travelled; for rotation effects
effect. For example, for move effects, they refer to the distance traveled; for rotation effects
Copy link
Member Author

Choose a reason for hiding this comment

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

we favor the American spelling

@@ -51,28 +51,28 @@ class SpriteFontTextFormatter extends TextFormatter {
@override
TextElement format(String text) {
var rects = Float32List(text.length * 4);
var rsts = Float32List(text.length * 4);
var transforms = Float32List(text.length * 4);
Copy link
Member Author

Choose a reason for hiding this comment

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

@st-pasha I have googled far and wide what rsts means but could not find it hahaha
since the parameter later becomes transforms I think that might be clearer
but if you prefer rsts I am happy to keep it if you can give some context to add to the dictionary

Copy link
Contributor

Choose a reason for hiding this comment

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

Haha, etymology time!
So, I took this name from Canvas.drawRawAtlas(), where it has the name rstTransforms, which is a Float32List. But really, it is interpreted as a sequence of RSTransform objects. And the name RSTransform is derived from Skia, and presumably it means "rotation-scale transform". No idea where the extra "t" in rstTransforms came from, probably it was a typo.

Renaming it into simply transforms sounds like a good idea.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, very interesting story.

so the issue is just on that flutter signature - rsts make sense as "rotation-scale transforms".
I imagine someone familiar with "rst" but that didn't know what it stood for called it "rst transform". similar to how people say "atm machine". funnily enough, elsewhere on flutter code it is correctly called rsTransform.
might make a PR to see what they say

as for our code, I think rsTransforms or just transforms are both good. I will merge transforms but lmk if you prefer rsTransforms I can change it

@@ -19,7 +19,7 @@ class Inventory extends StatelessWidget {
String _mapWeaponName(Weapon weapon) {
switch (weapon) {
case Weapon.bullet:
return 'Kinect';
return 'Kinetic';
Copy link
Member Author

Choose a reason for hiding this comment

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

I assume they didn't mean the video game peripheral

@luanpotter luanpotter marked this pull request as ready for review January 28, 2023 20:10
@@ -422,7 +422,7 @@ with a `passive` `CollisionType`. Collisions will be explained more in a later
#### Display the Platform

In our `loadGameSegments` method from earlier, we will need to add the call to add our block. We
will need to define `gridPosition` and `xOffset` to be passed in. `gridPostion` will be a
will need to define `gridPosition` and `xOffset` to be passed in. `gridPosition` will be a
Copy link
Contributor

Choose a reason for hiding this comment

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

How come spell didn't catch this? Should we add it to the flagWords in cspell.json?

Copy link
Member Author

Choose a reason for hiding this comment

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

because we have it set to ignore anything within backticks via regex on config. I am working on improving that to be more strict

@@ -51,28 +51,28 @@ class SpriteFontTextFormatter extends TextFormatter {
@override
TextElement format(String text) {
var rects = Float32List(text.length * 4);
var rsts = Float32List(text.length * 4);
var transforms = Float32List(text.length * 4);
Copy link
Contributor

Choose a reason for hiding this comment

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

Haha, etymology time!
So, I took this name from Canvas.drawRawAtlas(), where it has the name rstTransforms, which is a Float32List. But really, it is interpreted as a sequence of RSTransform objects. And the name RSTransform is derived from Skia, and presumably it means "rotation-scale transform". No idea where the extra "t" in rstTransforms came from, probably it was a typo.

Renaming it into simply transforms sounds like a good idea.

@luanpotter luanpotter merged commit 343b845 into main Jan 28, 2023
@luanpotter luanpotter deleted the luan.cspell.typos branch January 28, 2023 21:58
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.

3 participants