Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Bug 1492018: Prefer .blockIndicator for styling block indicators#4979

Merged
schalkneethling merged 5 commits intomdn:masterfrom
EB-Forks:styles/wiki/indicators/bug1492018-block-indicator
Oct 17, 2018
Merged

Bug 1492018: Prefer .blockIndicator for styling block indicators#4979
schalkneethling merged 5 commits intomdn:masterfrom
EB-Forks:styles/wiki/indicators/bug1492018-block-indicator

Conversation

@ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Sep 19, 2018

See bug 1492018 for details.

TODO

  • Add the .properties class to the :matches(…) selector (see ime-mode for a case where this is necessary)
  • Push remaining commits (3/3)

Changes:

  • Add support for snugging .blockIndicator.
  • Add indicator colour override classes (obsoletes Bug 1492018: Use .blockIndicator for styling {{SeeCompatTable}} #4962):
    • .indicator-info - grey
    • .indicator-version - blue
    • .indicator-warning - yellow
    • .indicator-danger - red
  • Use classes instead of style attributes for ES7/Harmony and JSOverrides.
  • Fix <pre> block and .properties table snugging.

review?(@schalkneethling)

@schalkneethling
Copy link

@ExE-Boss please rebase this against the latest in master. There are some display problems caused by this branch being out of sync with some recent changes. Thanks!

@ExE-Boss ExE-Boss force-pushed the styles/wiki/indicators/bug1492018-block-indicator branch from 53ee3b0 to 9876ccb Compare October 8, 2018 22:58
@ExE-Boss ExE-Boss force-pushed the styles/wiki/indicators/bug1492018-block-indicator branch from 9876ccb to 637908e Compare October 9, 2018 00:05
@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Oct 9, 2018

@schalkneethling: This is ready for a second round of review.

@ExE-Boss ExE-Boss force-pushed the styles/wiki/indicators/bug1492018-block-indicator branch 2 times, most recently from 6f55ee5 to 495a940 Compare October 9, 2018 01:49
@ExE-Boss ExE-Boss force-pushed the styles/wiki/indicators/bug1492018-block-indicator branch from 495a940 to 0e3a01f Compare October 9, 2018 02:04
@schalkneethling
Copy link

Thanks for the update @ExE-Boss, will review as soon as possible.

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

Couple of items remaining. Getting very close. Thanks @ExE-Boss

@include indicator-icon('\f017'); /* clock */
}

.esHarmony,

Choose a reason for hiding this comment

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

We need to standardize on how classes are written. For the vast majority of the code base, and pretty much the standard across projects, class names should follow the pattern descriptive-word and not the JS variable form of descriptiveWord

Therefore this needs to be updated to be es-harmony. There are a couple of classes here that does not follow that convention, we can clean this up in a follow on pull request.


/* es7 and harmony macros */
.esHarmony {
@include box-theme('positive');

Choose a reason for hiding this comment

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

I feel like we need to be consistent with the colors we assign to these callout widgets. Experimental feel to me more like a blue, or even orange, than a green.

Here for example it is blue:
http://localhost:8000/en-US/docs/Web/API/DeviceLightEvent/Using_light_sensors

But then on the Object.observe page locally it is green:
http://localhost:8000/tr/docs/Web/JavaScript/Reference/Global_Objects/Object/observe

I would suggest that we keep this consistent, and rather opt for blue in experimental cases.

Copy link
Contributor Author

@ExE-Boss ExE-Boss Oct 12, 2018

Choose a reason for hiding this comment

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

I think I’ll just use the .experimental and .indicator-warning classes for {{ES7}} to match {{SeeCompatTable}}, also {{ES7}} is used very little, so it may very well end up on the cutting room floor as part of the KumaScript Macro Massacre project.

@ExE-Boss ExE-Boss mentioned this pull request Oct 16, 2018
@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Oct 16, 2018

@schalkneethling: This is ready for a third round of review.

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

r+ Thanks @ExE-Boss

@ExE-Boss
Copy link
Contributor Author

So, can this be merged now?

@schalkneethling
Copy link

Ok, I have tested this on a couple of pages(will do some more testing) where I have the new styles in Kuma, but the old macros in kumascript. I cannot find any instances where things fall apart.

So, I believe we are safe to merge this and the KumaScript PR and push to production. For the space of time where we will have the old macros and new classes(until the pages have been regenerated) all should be fine.

With that said, we should probably hold of until Monday when @jwhitlock is back.

@jwhitlock
Copy link
Contributor

With that said, we should probably hold of until Monday when @jwhitlock is back.

I don't think this needs to wait for me. It appears to me the worst that can happen is a banner is un-styled, and @ExE-Boss can then either force-refresh a page or edit the content to add the class.

@ExE-Boss
Copy link
Contributor Author

So then let’s merge this and mdn/kumascript#830.

(also I’ve had this loaded in Stylus for the last week or so and everything looks fine)

@schalkneethling schalkneethling merged commit ff32725 into mdn:master Oct 17, 2018
@ExE-Boss ExE-Boss deleted the styles/wiki/indicators/bug1492018-block-indicator branch October 17, 2018 10:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments