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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve consistency of variable map keys #4116

Merged
merged 10 commits into from
Nov 5, 2021

Conversation

lyubomir-popov
Copy link
Contributor

Done

Minimal renaming of variables and maps to make using them a little more intuitive.

QA

  • Review updated documentation (the upgrade guide)
  • Review name changes

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

Screenshots

[if relevant, include a screenshot or screen capture]

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4116.demos.haus


The variable `$max-width--default` has been renamed to `$text-max-width`. All other heading max-width variables have been replaced by $text-max-width.

The keys in map `$nudges` no longer include the `$nudge--` prefix.
Copy link
Contributor

Choose a reason for hiding this comment

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

The keys don't have $ prefix:

Suggested change
The keys in map `$nudges` no longer include the `$nudge--` prefix.
The keys in map `$nudges` no longer include the `nudge--` prefix.

I know this would look quite repetitive, but could be useful to be more clear and explicit. Would be nice to have a table of all the renames:

before after
map-get($nudges, nudge--p) map-get($nudges, p)
map-get($nudges, nudge--h1) map-get($nudges, h1)
etc...

with list of all renamed keys, to make it clear what gets replaced with what, and to make searching easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pushed the fixes.

@lyubomir-popov
Copy link
Contributor Author

good points, thanks @bartaz.

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM, just needs to be rebased to resolve conflicts

templates/docs/whats-new.md Outdated Show resolved Hide resolved
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM, with small suggestion to not change past changelog.

But the PR has conflicts still (or again?)

@bartaz bartaz changed the title improve consistency of variable names Improve consistency of variable map keys Nov 5, 2021
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Conflict marks should be removed.

@@ -38,7 +38,12 @@ Use of `.col` classes outside of `.row` is no longer supported. If you use `.col

### Column layout change

<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

These conflict marks should be removed (not sure why I can't suggest it on GH).

Previously, the grid layout would switch from 6 to 12 columns wide at the medium breakpoint. With the removal of the medium breakpoint, this has been changed so that the switch happens at the large breakpoint instead. We recommend visually checking your layouts at each breakpoint for any adverse effects this change may cause.
=======
Max-widths should not be based on font-size. Any legacy classes, placeholders, or mixins that used a font-size based max-width setting will be removed. Use `$text-max-width` instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

This whole block from conflict should be removed. Max-widths are separately explained below, so this text and surrounding conflict marks can be removed.

lyubomir-popov and others added 2 commits November 5, 2021 15:21
Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM

@lyubomir-popov lyubomir-popov merged commit fac8769 into canonical:main Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants