Prevent duplicating .ellipsis-y-* CSS classes into every component stylesheet - #6271
Merged
Merged
Conversation
Removed mixin generation for ellipsis classes.
Contributor
|
Thanks @saschaszott. You're right, there are 58 on sandbox.dspace.org right now.
I tested this and these class definitions are no longer present on pages that don't use them (currently only the |
alanorth
approved these changes
Sep 27, 2026
Contributor
Author
|
@alanorth , thanks for reviewing this. Should we backport it to DSpace 10.2? |
Contributor
|
Apologies @saschaszott, yes this should be ported to DSpace 10.2. I looked briefly and didn't see this code on the dspace-10.1 tag, but I realize I missed it because I grepped for "ellipsys" instead of "ellipsis". Sorry! I'm not sure if we can use the automatic porting bot now that this has been merged. If you port it I will merge it. Thank you. |
Contributor
|
@saschaszott I've ported it to Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

References
.ellipsis-y-*classes in_mixins.scssare duplicated into every component stylesheet (bloats SSR HTML and JS bundles) #6270Description
_mixins.scssis prepended to every component SCSS file bysass-resources-loader, so the@forloop that generates.ellipsis-y-1….ellipsis-y-10is compiled into the styles of every DSpace Angular component. This PR removes that loop and defines the two required CSS classes that are actually used locally inmetadata-link-view-popover.component.scss.Instructions for Reviewers
Run DSpace frontend with a production build (so that SSR is enabled). Open the landing page of an DSpace item, e.g., a publication or project.
Before applying the change: The HTML code contains 50+ duplicated rules
.ellipsis-y-1….ellipsis-y-10(almost 10% of the size of the HTML file). Additionally, you'll find 500+ component-scoped copies indist/browser/*.jsand 1000+ indist/server/*.js.After applying the change: restart the Angular fronend (SSR cache is empty) and reload the HTML landing page. The duplicated CSS classes in the HTML source are no longer present.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.