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

Styles: Less file housecleaning #877

Merged
merged 8 commits into from
Aug 13, 2024
Merged

Styles: Less file housecleaning #877

merged 8 commits into from
Aug 13, 2024

Conversation

jeremywiebe
Copy link
Collaborator

A round of Less file cleanup. There were a bunch of unused variables and files. I figured out what was unused by running yarn build --watch and then starting to delete variables. Any time there was a varaible that was still in use, there would be an error like this [!] (plugin commonjs--resolver) Error: variable @gray95 is undefined.

  • Get rid of variables.shared.less and move the single used variable to variables.less
  • Rename articles.less to styles.less as it has rules for both articles and exercises!
  • Remove completely unused variables.bootstrap.less
  • Remove outdated comment
  • Extract zoom styles to own file out of styles.less
  • Trim out more unused variables from variables.less

Issue: --none--

Test plan:

yarn build is successful (our builds process Less files into CSS and so if there's variable references that no longer exist, it will fail)

@jeremywiebe jeremywiebe self-assigned this Dec 15, 2023
Copy link
Contributor

github-actions bot commented Dec 15, 2023

Size Change: +1 B (0%)

Total Size: 855 kB

Filename Size Change
packages/perseus/dist/es/index.js 414 kB +1 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.3 kB
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 78.2 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 276 kB
packages/perseus-linter/dist/es/index.js 21.6 kB
packages/perseus/dist/es/strings.js 3.29 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.73%. Comparing base (9cb0321) to head (d386a85).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
+ Coverage   70.37%   70.73%   +0.36%     
==========================================
  Files         513      516       +3     
  Lines      106106   106139      +33     
  Branches     7713    11503    +3790     
==========================================
+ Hits        74672    75082     +410     
+ Misses      31317    31057     -260     
+ Partials      117        0     -117     

Impacted file tree graph

Files Coverage Δ
packages/perseus/src/renderer.tsx 93.98% <100.00%> (+1.46%) ⬆️
packages/perseus/src/styles/shared.ts 100.00% <100.00%> (ø)
packages/perseus/src/util/sizing-utils.ts 78.26% <100.00%> (-2.18%) ⬇️

... and 122 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cb0321...d386a85. Read the comment docs.

@jeremywiebe jeremywiebe changed the title ## Summary: Styles: Less file housecleaning Dec 18, 2023
@@ -672,73 +671,4 @@
}
}

/* Derived from the MIT-licensed zoom.js:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This chunk of styles was moved to zoom.less

@jeremywiebe jeremywiebe marked this pull request as ready for review January 9, 2024 00:36
@jeremywiebe jeremywiebe requested a review from a team January 9, 2024 00:36
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Jan 9, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/grumpy-icons-retire.md, packages/perseus/src/renderer.tsx, packages/perseus/src/styles/perseus-renderer.less, packages/perseus/src/styles/shared.ts, packages/perseus/src/styles/styles.less, packages/perseus/src/styles/variables.less, packages/perseus/src/styles/zoom.less, packages/perseus/src/util/sizing-utils.ts

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

Copy link
Contributor

@nedredmond nedredmond left a comment

Choose a reason for hiding this comment

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

All looks good to me! Thanks, @jeremywiebe !

@nedredmond nedredmond requested review from a team and nedredmond and removed request for nedredmond July 18, 2024 17:16
Copy link
Contributor

github-actions bot commented Jul 18, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR877

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR877

@benchristel benchristel removed the request for review from a team July 29, 2024 20:13
@jeremywiebe jeremywiebe merged commit 720e3bf into main Aug 13, 2024
11 checks passed
@jeremywiebe jeremywiebe deleted the css-cleanup branch August 13, 2024 21:49
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