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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Styles: Less file housecleaning #877

wants to merge 10 commits into from

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: -3 B (0%)

Total Size: 834 kB

Filename Size Change
packages/perseus/dist/es/index.js 403 kB -3 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.1 kB
packages/kmath/dist/es/index.js 4.25 kB
packages/math-input/dist/es/index.js 79 kB
packages/perseus-core/dist/es/index.js 908 B
packages/perseus-editor/dist/es/index.js 270 kB
packages/perseus-error/dist/es/index.js 877 B
packages/perseus-linter/dist/es/index.js 21.8 kB
packages/pure-markdown/dist/es/index.js 3.77 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 ✅

Comparison is base (d9b74a3) 59.43% compared to head (42e9bc9) 60.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
+ Coverage   59.43%   60.72%   +1.28%     
==========================================
  Files         417      419       +2     
  Lines       99579    99596      +17     
  Branches     6053     8607    +2554     
==========================================
+ Hits        59187    60478    +1291     
+ Misses      40392    39118    -1274     

Impacted file tree graph

Files Coverage Δ
packages/perseus/src/renderer.tsx 92.56% <100.00%> (ø)
packages/perseus/src/styles/shared.ts 100.00% <100.00%> (ø)
packages/perseus/src/util/sizing-utils.ts 69.56% <100.00%> (ø)
packages/perseus/src/widgets/explanation.tsx 94.63% <100.00%> (ø)

... and 71 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 d9b74a3...42e9bc9. 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

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, packages/perseus/src/widgets/explanation.tsx

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants