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

Corrects SCSS compile extend error #2922

Merged
merged 13 commits into from Jun 21, 2023

Conversation

ckaz
Copy link
Contributor

@ckaz ckaz commented Jun 2, 2023

This corrects the SCSS compile error from line 386 in bootstrap.less introduced in #2779

@demiankatz demiankatz added this to the 9.1 milestone Jun 2, 2023
@ckaz
Copy link
Contributor Author

ckaz commented Jun 8, 2023

Sorry, I had to fix a few more things here.

@demiankatz
Copy link
Member

Thanks, @ckaz, looks much better to me now. I'm a bit short on time this week but will try to check this out early next week at the latest.

@demiankatz
Copy link
Member

@ckaz, I'll wait and see what happens with @EreMaijala's latest question before I do further testing on this. Sounds like further simplification may be possible, so I'll wait and see so I can test the (hopefully) final version.

Copy link
Contributor Author

@ckaz ckaz left a comment

Choose a reason for hiding this comment

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

Will remove SCSS-specific comment in favor of @extend

themes/bootstrap3/less/bootstrap.less Outdated Show resolved Hide resolved
@ckaz
Copy link
Contributor Author

ckaz commented Jun 16, 2023

Sorry, I had to fix a few more things here.

@ckaz, I'll wait and see what happens with @EreMaijala's latest question before I do further testing on this. Sounds like further simplification may be possible, so I'll wait and see so I can test the (hopefully) final version.

Sorry for the delay, we had a chaotic week ...

@ckaz ckaz requested a review from EreMaijala June 16, 2023 08:42
@ckaz
Copy link
Contributor Author

ckaz commented Jun 16, 2023

I've removed the over-complicated SCSS-rewrite spotted by @EreMaijala -- guess that should be it, then?
(I've merged dev into this PR and got no conflicts.)

@demiankatz
Copy link
Member

No worries, @ckaz! I have a long weekend but I'll take another look at this early next week and hopefully get all the SCSS-related stuff wrapped up then.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

@ckaz, sorry for not realizing this sooner, but this PR seems to rely on making changes to vendor files, which is something we shouldn't do, because they're third-party files that are not under the control of this project. If we make changes there, then whenever we upgrade the third-party library, we'll lose our changes. Perhaps that's not such an issue here because bootstrap is at end of life and should be replaced soon anyway, but I still in principle don't particularly like that solution.

Additionally, code quality checking and auto-conversion are not applied to vendor files, so it appears that this has caused the LESS and SCSS versions of these files to get out of sync with each other.

Is there a simpler way to solve this problem?

@demiankatz
Copy link
Member

@ckaz, after talking to @EreMaijala, I suspect the simplest solution here may simply be to duplicate the vendor styles in a place that we control. I think in this instance the redundancy would be justified.

* reverts vendor files to state prior to PR
@ckaz
Copy link
Contributor Author

ckaz commented Jun 20, 2023

@ckaz, after talking to @EreMaijala, I suspect the simplest solution here may simply be to duplicate the vendor styles in a place that we control. I think in this instance the redundancy would be justified.

You are right, of course. Just committed my changes. I still can't test this locally in the browser, but the files seem to compile fine.
Pls. let me know if that works for you.

Copy link
Contributor Author

@ckaz ckaz left a comment

Choose a reason for hiding this comment

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

I've created a custom 'mixins' folder and moved the changes there. SCSS seems to compile fine.

Copy link
Contributor Author

@ckaz ckaz left a comment

Choose a reason for hiding this comment

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

Still confused by the review mechanisms here. I need to check all files and then press "Review changes", right?

@demiankatz
Copy link
Member

Thanks, @ckaz, I'll give this another look very soon. Regarding the review mechanism, you should just be able to click the icon next to my name in the "Reviewers" section at the top-right of the pull request to re-request a review from me. It shouldn't be necessary to select any files.

@demiankatz
Copy link
Member

@ckaz, there were a bunch of remaining issues here: some vendor files were still being modified, the lessToSass process wasn't correctly converting the new mixins directory, and there were some apparently hand-converted SCSS mixins that seemed out of sync with the Less versions. I've tried to clean this all up and have pushed up a new version. Can you take a look at this and let me know if it seems okay from your end?

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

@ckaz, I just tested this, comparing the impacted dropdown menus between the dev branch and this branch, using both LESS and SCSS compilation. The dropdown menus themselves are consistent in all situations, so I think this PR is a success. (I should note that I only checked the bootprint3 theme due to time limitations, but I have no reason to believe the others would differ).

I have one small suggestion regarding a comment (see below). I'm happy to merge this once you've had a chance to review and approve my own changes, and adjust the comment if you so desire.

I should also note that some other aspects of styles do appear to be inconsistent between LESS and SCSS: the "format" pills were different colors, and the "pressed" state of the button that triggered the drop-down menu looked different. I suspect that these problems are unrelated to the changes here, however.

themes/bootstrap3/less/mixins/dropdowns.less Outdated Show resolved Hide resolved
Copy link
Contributor Author

@ckaz ckaz left a comment

Choose a reason for hiding this comment

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

Looks good to me. Did change the comment.

@demiankatz demiankatz removed the request for review from crhallberg June 21, 2023 10:41
Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks for the updates -- looks good now, so I will merge shortly.

I agree that some follow-up on the SCSS inconsistencies might be a good idea, and your theory about the cause seems likely to be correct. If you don't have time to look at this any time soon, let me know and I'll open a JIRA ticket so we don't lose track.

@demiankatz demiankatz merged commit a4efc0e into vufind-org:dev Jun 21, 2023
7 checks passed
@ckaz
Copy link
Contributor Author

ckaz commented Jun 21, 2023

Thanks for the updates -- looks good now, so I will merge shortly.

I agree that some follow-up on the SCSS inconsistencies might be a good idea, and your theory about the cause seems likely to be correct. If you don't have time to look at this any time soon, let me know and I'll open a JIRA ticket so we don't lose track.

I'll be on leave for most of July, so a JIRA ticket would be the best option, I guess. Cheers!

@demiankatz
Copy link
Member

Thanks, @ckaz! I have opened VUFIND-1619 so we don't lose track of this. I've pinned it to release 10.0, because I don't think it's an urgent priority, and it's possible needs will change depending on overall theme redesign strategy... but it's important to keep it in the discussion for now.

I hope you enjoy your leave!

bpalme pushed a commit to bpalme/vufind that referenced this pull request Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants