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

[full-ci] Dedupe CSS #8041

Merged
merged 5 commits into from
Dec 1, 2022
Merged

[full-ci] Dedupe CSS #8041

merged 5 commits into from
Dec 1, 2022

Conversation

dschmidt
Copy link
Member

@dschmidt dschmidt commented Nov 29, 2022

Description

This PR aims to remove the duplicated CSS caused by imports in the design-system.

It's not perfect yet, breadcrumbs are broken and input fields (like the search input) look wrong, otherwise it seems to work fairly ok.

I would be glad if someone with more knowledge of the styles in this project to pick this up and fix the remaining issues.

Thanks to @JammingBen for stepping up and taking care of the issues I had left open!🏅

I have applied the same approach in my vite PR, there everything is even a little more sophisticated (and has the same issues) works the same way, so I'd say finishing this, would be a good preparation for solving this in Vite as well.

Related Issue

  • Fixes <issue_link>

Motivation and Context

Since we imported the ODS into this repo, we have a lot of duplicated styles through imports in the ODS components. This slows down the dev tools a lot and (if not stripped in production builds) bloats the built assets.

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@update-docs
Copy link

update-docs bot commented Nov 29, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@ownclouders
Copy link
Contributor

ownclouders commented Nov 29, 2022

Results for oC10SharingIntGroups https://drone.owncloud.com/owncloud/web/30265/25/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUISharingInternalGroups-shareWithGroups_feature-L222.png

webUISharingInternalGroups-shareWithGroups_feature-L222.png

@dschmidt dschmidt changed the title WIP: Dedupe CSS [full-ci] Dedupe CSS Nov 29, 2022
@JammingBen
Copy link
Contributor

JammingBen commented Nov 30, 2022

I replaced the @extend usages in our components with actual CSS and/or mixins (because @extend does not work in components with this approach). Most of the extends were unnecessary anyway IMO.

The only real exception is the extension of the oc-input class which was kinda nice. We could do that via mixin in the future, but that requires quite some refactoring. For now, I manually added the oc-input class when oc-text-input is being used. It's wrapped in our OcTextInput component anyway, so ideally you use this one.

Let's see what pipeline says.

packages/design-system/src/styles/styles.scss Show resolved Hide resolved
rollup.config.mjs Show resolved Hide resolved
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

yay 🥳

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

12.5% 12.5% Coverage
0.0% 0.0% Duplication

@kulmann
Copy link
Member

kulmann commented Dec 1, 2022

The only failing tests are unrelated to this PR, see #8042
I'll force-merge now.

@kulmann kulmann merged commit 2699bbd into master Dec 1, 2022
@delete-merged-branch delete-merged-branch bot deleted the dedupe-css branch December 1, 2022 12:28
@dschmidt
Copy link
Member Author

dschmidt commented Dec 1, 2022

Sweeeeet!

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