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
Build css from scss sources in client ui build #3434
Conversation
Can you explain why move the ui directory to client? |
I found this location more appropriate, because the frontend resources in this ui folder are the main resources for the client ui module, so they fit better in there instead of the root directory of the project. Also they now get more intensively used by this build so I think it might be a good idea to keep them together. They don't get used by any other module. |
In the present form renaming ui folder just because it feels like may not be encouraged because it will cause conflicts for so many existing PRs and will cause porting and forward merging issues. Let's visit this in future, at least after 4.13. However, if you want the PR go into 4.13 please remove the renaming changes. |
Agree with @rhtyd. I would prefer to postpone any major restructuring to after 4.13 as well unless it's an urgent necessity. Please note cut dates for 4.13 are out and major changes for 4.13 should be in debate or close to merge by now already. |
@svenvogel I'll readded this PR to 4.13.0.0 milestone on your remark. Keep us posted, thanks. |
@rhtyd ping we moved the files back in the old location. it should look okay now. |
Thanks @svenvogel but I still see several large changes and file renames and I'm not sure I understand what is intended to be here. I can make out that it introduces a new gulp/npm dependency during build. Please have a look at: Copied from above:
|
@webermaximilian92 I see some large css files removed, I don't understand if we're removing them how does that affect our build/usage? @pbankonier can you fix the conflict GitHub is complaining about? |
@rhtyd That these css files get finally removed is just a consequence from this change #3307. The css files should not be edited nonetheless right now, because they get build from the scss sources. So the css files should have been removed already in that PR. Everyone who wants to make a styling change should edit the scss files and then build the css from them. Normally you would not keep the css files in the repo, because have redundant information regarding the scss files, so when someone changes one without the other we will get an inconsistent state of these files, which results in the necessity of someone keeping them in sync manually. |
Thanks for explaining @pbankonier I would have asked for a complete design document for all sorts of UI changes that are coming because they have long term impact on all developers including build and CI systems. I'm sure there are others in the community who're unable to track the intent spread across a couple of related PRs. I was not aware of the PR #3307 and was not tracking it as it was not tagged against a milestone (just added one because it's already merged). Generally reviewers, RMs and co-RMs working towards a release/milestone may not track PRs that bring wide amount of changes or break several existing PRs because it will be a lot of work to get authors of existing PRs which may get merge conflict if a PR like this would be merged. We have about 90-100 open items on 4.13.0.0 milestone and many of which have UI/css changes or are UI issues that may require fixes in css files. Due to this, I have moved milestone of this PR to 4.14, hope I've your support and understanding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-0 I tried to review the diff, but I don't know gulp
and scss
enough to be able to review the changes. I can get around with the UI and css changes, I think this change will make it slightly harder and also since the UI lacks tests (both functional/integration and unit) it will be harder to regression test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pbankonier can you address the merge conflicts pls
@pbankonier @svenvogel - do you think we can close this now that we have Primate? |
@pbankonier @svenvogel - with primate in, kindly close this. Let's move all major UI development work in Primate. Thanks. |
@rhtyd closed in favor of cloudstack primate development https://github.com/apache/cloudstack-primate/ |
Description
The following things are done in this PR:
Add the compiling of the scss sources to css to the maven build for the client ui. I used this (https://github.com/eirslett/frontend-maven-plugin) maven plugin for that.
This was required to remove the css files from the project. This is necessary, because it happened multiple times that the css files were modified directly instead of editing and then compiling the scss files, which results in a mismatch between the scss src and the compiled css.
e.g. https://github.com/apache/cloudstack/pull/3240/files
I moved these missing changes into the corresponding scss files here.
This (compiling scss to css during the build) is the currently preferred way of handling these frontend resources.
This changes are not affecting any functionality nor are a breaking change.
Types of changes
How Has This Been Tested?
Deployed this to our test environment and tested functionality.