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 almost all traces of Flow #457

Merged
merged 3 commits into from
Apr 3, 2023
Merged

Remove almost all traces of Flow #457

merged 3 commits into from
Apr 3, 2023

Conversation

kevinbarabash
Copy link
Contributor

Summary:

This PR makes the following changes:

  • removes all flow related tooling except for flowgen
  • updates almost all coments reference Flow to references TypeScript to be tool agnostic

Issue: None

Test plan:

  • yarn tsc

@kevinbarabash kevinbarabash self-assigned this Mar 31, 2023
@changeset-bot
Copy link

changeset-bot bot commented Mar 31, 2023

🦋 Changeset detected

Latest commit: 4da3e62

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@khan-actions-bot khan-actions-bot requested a review from a team March 31, 2023 23:18
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Mar 31, 2023

Gerald

Required Reviewers
  • @Khan/perseus for changes to .codecov.yml, .eslintignore, .prettierignore, package.json, yarn.lock, .changeset/gold-glasses-punch.md, testing/test-dependencies.tsx, .github/workflows/node-ci.yml, packages/kmath/src/vector.ts, packages/perseus/src/definition-context.tsx, packages/perseus/src/hints-renderer.tsx, packages/perseus/src/item-renderer.tsx, packages/perseus/src/perseus-markdown.tsx, packages/perseus/src/perseus-types.ts, packages/perseus/src/renderer.tsx, packages/perseus/src/server-item-renderer.tsx, packages/perseus/src/widgets.ts, packages/perseus/src/zoom.ts, packages/perseus-editor/src/article-editor.tsx, packages/perseus-editor/src/editor.tsx, packages/perseus-editor/src/multirenderer-editor.tsx, packages/perseus-linter/src/rule.ts, packages/perseus-linter/src/tree-transformer.ts, packages/pure-markdown/src/index.ts, packages/simple-markdown/src/index.ts, packages/math-input/src/components/gesture-state-machine.js, packages/math-input/src/fake-react-native-web/view.tsx, packages/perseus/src/__testdata__/item-renderer.testdata.ts, packages/perseus/src/__testdata__/renderer.testdata.ts, packages/perseus/src/__tests__/item-renderer.test.tsx, packages/perseus/src/__tests__/renderer-api.test.tsx, packages/perseus/src/__tests__/renderer.test.tsx, packages/perseus/src/components/fixed-to-responsive.tsx, packages/perseus/src/components/graph.tsx, packages/perseus/src/components/math-input.tsx, packages/perseus/src/components/number-input.tsx, packages/perseus/src/components/text-list-editor.tsx, packages/perseus/src/components/zoomable-tex.tsx, packages/perseus/src/components/zoomable.tsx, packages/perseus/src/mixins/changeable.ts, packages/perseus/src/multi-items/multi-renderer.tsx, packages/perseus/src/multi-items/prop-type-builders.ts, packages/perseus/src/multi-items/shape-types.ts, packages/perseus/src/multi-items/tree-types.ts, packages/perseus/src/util/interactive.ts, packages/perseus/src/util/math.ts, packages/perseus/src/widgets/expression.tsx, packages/perseus/src/widgets/graded-group-set.tsx, packages/perseus/src/widgets/graded-group.tsx, packages/perseus/src/widgets/grapher.tsx, packages/perseus/src/widgets/group.tsx, packages/perseus/src/widgets/interaction.tsx, packages/perseus/src/widgets/interactive-graph.tsx, packages/perseus/src/widgets/measurer.tsx, packages/perseus/src/widgets/number-line.tsx, packages/perseus/src/widgets/orderer.tsx, packages/perseus/src/widgets/passage-ref-target.tsx, packages/perseus/src/widgets/plotter.tsx, packages/perseus/src/widgets/transformer.tsx, packages/perseus-editor/src/components/dropdown-option.tsx, packages/perseus-editor/src/diffs/text-diff.tsx, packages/perseus-editor/src/diffs/widget-diff.tsx, packages/perseus-editor/src/widgets/categorizer-editor.tsx, packages/perseus-editor/src/widgets/cs-program-editor.tsx, packages/perseus-editor/src/widgets/expression-editor.tsx, packages/perseus-editor/src/widgets/grapher-editor.tsx, packages/perseus-editor/src/widgets/iframe-editor.tsx, packages/perseus-editor/src/widgets/input-number-editor.tsx, packages/perseus-editor/src/widgets/interaction-editor.tsx, packages/perseus-editor/src/widgets/interactive-graph-editor.tsx, packages/perseus-editor/src/widgets/transformer-editor.tsx, packages/simple-markdown/src/__tests__/simple-markdown.test.ts, packages/perseus/src/components/highlighting/word-indexer.tsx, packages/perseus/src/interactive2/__tests__/movable-point.test.ts, packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx, packages/perseus/src/multi-items/__tests__/items.test.ts, packages/perseus/src/multi-items/__tests__/multi-renderer.test.tsx, packages/perseus/src/multi-items/__tests__/prop-type-builders.test.ts, packages/perseus/src/multi-items/__tests__/trees.test.ts, packages/perseus/src/widgets/__stories__/image.stories.tsx, packages/perseus/src/widgets/__testdata__/numeric-input.testdata.ts, packages/perseus/src/widgets/__testdata__/transformer.testdata.ts, packages/perseus/src/widgets/__tests__/radio.test.ts, packages/perseus/src/widgets/grapher/util.tsx, packages/perseus/src/widgets/passage/passage-markdown.tsx, packages/perseus/src/widgets/radio/base-radio.tsx, packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx, packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx, packages/perseus-editor/src/widgets/label-image/marker.tsx, packages/perseus/src/components/highlighting/ui/highlighting-ui.tsx, packages/perseus/src/components/highlighting/ui/selection-tracker.tsx, packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2023

Size Change: -2.05 kB (0%)

Total Size: 652 kB

Filename Size Change
packages/kmath/dist/es/index.js 4.13 kB -41 B (-1%)
packages/math-input/dist/es/index.js 60.3 kB -35 B (0%)
packages/perseus-editor/dist/es/index.js 114 kB -542 B (0%)
packages/perseus-linter/dist/es/index.js 21.2 kB -119 B (-1%)
packages/perseus/dist/es/index.js 398 kB -1.26 kB (0%)
packages/pure-markdown/dist/es/index.js 3.65 kB -23 B (-1%)
packages/simple-markdown/dist/es/index.js 12.6 kB -25 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38 kB
packages/perseus-error/dist/es/index.js 705 B

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2023

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (075efe1) and published it to npm. You
can install it using the tag PR457.

Example:

yarn add @khanacademy/perseus@PR457

@kevinbarabash kevinbarabash requested a review from a team March 31, 2023 23:27
Comment on lines +64 to +66
_selectionIsValid(
trackedSelection?: TrackedSelection | null,
): trackedSelection is TrackedSelection {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a type predicate. This tells TypeScript to set the type of trackedSelection to TrackedSelection if the function returns true. See https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates for more details.

@coveralls
Copy link
Collaborator

coveralls commented Mar 31, 2023

Coverage Status

Coverage: 43.017% (+0.03%) from 42.983% when pulling 4da3e62 on remove-flow into 8e8d85c on main.

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Great, thanks for this cleanup!

@kevinbarabash kevinbarabash merged commit ec4389e into main Apr 3, 2023
@kevinbarabash kevinbarabash deleted the remove-flow branch April 3, 2023 14:35
SonicScrewdriver added a commit that referenced this pull request Oct 26, 2023
… in the Transform Widget (#781)

## Summary:
Team-LC has noticed recently that the skip rate on our transformer widget was quite a bit higher than it is normally. After further investigation, we discovered that the "homothety"/dilation tool is spitting out a large barrage of errors and is no longer functional. We suspect this is likely the main cause for the increase in reports. 

@jeanettehead and I looked into the history of the file and noticed that a key line of code was accidentally shifted to be a part of a parent comment as part of a [PR that removed all references to flow in Perseus](#457).

`center: self.dilationCircle.centerPoint.coord`

 It looks like a pesky little newline was accidentally (and likely automatically) removed, causing us to lose access to the required "center" property for our dilation tool. 

Since this widget is deprecated and only sees minimal use in our international content, the visibility of the issue was incredibly low. Thankfully the new Perseus Widget Analyzer by @pmcgill88 helped us catch this issue by providing greater insight into how our widgets are being actively used. 

Issue: LC-1384

## Test plan:
manual testing

Author: SonicScrewdriver

Reviewers: jeanettehead, SonicScrewdriver, jeremywiebe, kevinbarabash

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ codecov/project, ❌ codecov/patch, ✅ Upload Coverage, ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Extract i18n strings (ubuntu-latest, 16.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 16.x), ✅ Check builds for changes in size (ubuntu-latest, 16.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 16.x), ✅ Cypress (ubuntu-latest, 16.x), ✅ Jest Coverage (ubuntu-latest, 16.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ✅ gerald

Pull Request URL: #781
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.

4 participants