Comments

lewisnyman’s picture

StatusFileSize
new202 bytes

Uploaded the css file so it can reviewed with Dreditor

lewisnyman’s picture

Issue summary: View changes
kyuubi’s picture

StatusFileSize
new108.27 KB

Hi LewisNyman,

I think the more link should be viewed as a sub-component of help.

Should be changed to .help__more-link to avoid repeating the component context "help" unnecessarily.

Attached is patch with this suggestion.

Let me know what you think.

Thanks,

kyuubi’s picture

Status: Active » Needs review
kyuubi’s picture

StatusFileSize
new1.9 KB

Ups,

Uploaded wrong patch in the previous comment.

Here goes the correct one.

Cheers,

lewisnyman’s picture

Title: Rewrite help component inline with our CSS standards » Rewrite help.module component's inline with our CSS standards
Component: Seven theme » help.module
Status: Needs review » Needs work

@kyuubi I think it's a good idea to keep the more-link class that is in system.theme.css as it's used elsewhere, but it means that there is some CSS that is

In Seven's CSS

.help div.more-help-link {
  text-align: right; /* LTR */
}
[dir="rtl"] .help div.more-help-link {
  text-align: left;
}

In system.theme.css

/**
 * More help link style.
 */
.more-help-link {
  text-align: right; /* LTR */
}
[dir="rtl"] .more-help-link {
  text-align: left;
}

We can delete this CSS and just use the more-link class.

Then we just need to figure out what to do with the rest of the CSS.

.more-help-link a {
  background: url(../../../misc/help.png) 0 50% no-repeat; /* LTR */
  padding: 1px 0 1px 20px; /* LTR */
}
[dir="rtl"] .more-help-link a {
  background-position: 100% 50%;
  padding: 1px 20px 1px 0;
}

This is basically just an icon, right? We can create a class called 'icon-help' that does this and add it to the link.

.help {
  font-size: 0.923em;
}
.help p {
  margin: 0 0 10px;
}

I'm unsure what to do with this CSS yet, why are we reducing the font-size? I'll have a look

kyuubi’s picture

Hi,

Here is a patch for what we discussed:

  1. We use the generic more-link class instead of the help specific more-help-link that does the same thing.
  2. To avoid targeting the anchor we use a generic icon-help class.For that I also had to add that in the forum.module
  3. Since the only thing left in the help.css component is a font-size rule and an override of the paragraphs in the help section that doesn't seem to serve any purpose we also delete component itself and use the base paragraph margins and font-size.

I am attaching screens for before and after of the help screen (where the .help p and .help font-size and margin rules have an effect) we well as screens for the more link replaced with generic icon class and more-link class.

lewisnyman’s picture

Status: Needs review » Needs work

This is looking great! I don't see the logic on making the font size smaller in just this one page... I tried to track down where this code was added and it was added in: #484860: Initial D7UX admin theme.

All we need to do it remove the reference to help.css in seven.libraries.yml

kyuubi’s picture

Status: Needs work » Needs review
StatusFileSize
new2.45 KB

Hi,

Here is the updated patch with the reference to help.css removed from seven.libraries.yml

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Woo yeah :)

idebr’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/forum/forum.module
    @@ -57,12 +57,15 @@ function forum_help($route_name, RouteMatchInterface $route_match) {
    +        '#attributes' => array(
    +            'class' => array('icon-help')
    

    Drupal coding standards use two spaces for indentation instead of four. Also a multiline array assignment should end in a comma, eg. array('icon-help'), instead of array('icon-help')

  2. +++ b/core/modules/forum/forum.module
    @@ -57,12 +57,15 @@ function forum_help($route_name, RouteMatchInterface $route_match) {
    +        )
    

    This line should end in a comma as well for coding standards.

  3. +++ /dev/null
    @@ -1,15 +0,0 @@
    -.help {
    -  font-size: 0.923em;
    -}
    -.help p {
    -  margin: 0 0 10px;
    -}
    

    This removes the styling for every help text in Seven. I think this is out of scope for a 'Rewrite CSS to coding standards' type of issue?

kyuubi’s picture

Hi idebr,

Thanks for this review!

  1. Will fix.
  2. Will fix.
  3. Why not use the base font-size and base paragraph here? The only thing this rule is doing is lowering the font-size by a marginal amount and overriding default margin for no apparent reason. I guess you maybe right in this being out of scope, so let me know if I leave it or if you want to open a separate issue for this.
idebr’s picture

@kyuubi Re #3: There is already a separate issue to remove small font sizes, so let's leave that part out here: #2045473: Improve visibility of Seven's smallest font elements

kyuubi’s picture

Hi idebr,

Ok will leave that one out and will put a patch with the rest later tonight.

Thanks!

lewisnyman’s picture

@idebr Ok, as it's a design change, let's leave that change out of this issue. Let's create a followup issue to remove it, because I don't think #2045473: Improve visibility of Seven's smallest font elements is going to get committed anytime soon.

kyuubi’s picture

Status: Needs work » Needs review
StatusFileSize
new2.01 KB
new1.43 KB

Hi guys,

Here is the patch with that we discussed.

Also attached interdiff.

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Great thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

Removing the more-help-link and replacing it with icon-help needs a CR.

kyuubi’s picture

Hi Alex,

The help-more-link was replaced with the generic more-link

The 'help-more-link a' was replaced with 'icon-help'.

Do you mean the latter?

Thanks,

lewisnyman’s picture

@alex are you sure that we need a change record for changing markup? We've changed a lot of markup in issues before without a CR.

alexpott’s picture

@LewisNyman we're completely removing a class - this needs a CR as some module author might be relying on the this functionality. And I've been asking for CRs on issues that are removing classes before.

kyuubi’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record

@alexpott Added the CR:

https://www.drupal.org/node/2462579

Let me know if everything is in order.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
lewisnyman’s picture

@alexpott Ah ok got it, I'll bear that in mind. I suppose that includes removing/changing classes in themes.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/forum/forum.module
@@ -57,12 +57,15 @@ function forum_help($route_name, RouteMatchInterface $route_match) {
-          'class' => array('more-help-link'),
+          'class' => array('more-link'),

The CR needs to mention that more-link replaces more-help-link. And that the icon-help is used on text inside the container.

andypost’s picture

It totally makes sense to have CRs for removed core classes, and it would be great to have them indexed in one CR to allow contrib themes to follow core changes. Especially for themes that used for administration

kyuubi’s picture

Status: Needs work » Needs review

Hi,

I updated the CR to reflect the changes to the more-link as well.

Also change title to be more generic in order to incorporate other eventual changes to this component.

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Hi, I updated the CR slightly to make the title more clear. I think that we're unlikely to change the mark up anymore than we have here, so we don't have to increase the scope of the CR.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 16: help-2408481-16.patch, failed testing.

Karmen’s picture

Assigned: Unassigned » Karmen
Karmen’s picture

Status: Needs work » Needs review
StatusFileSize
new2.01 KB

Upload the reroll.

I'm not very sure about put 'reroll' in the syntax of the patch. But, wait your answer.
Thank you!

lewisnyman’s picture

Status: Needs review » Needs work
Issue tags: +Novice

Great thanks.

+++ b/core/themes/seven/css/components/help.css
@@ -1,12 +1,11 @@
+.help {
+  font-size: 0.923em;
+}

We can remove this CSS, because this was removed previously in #2045473: Improve visibility of Seven's smallest font elements

Karmen’s picture

Assigned: Karmen » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.98 KB

Here is the new patch!

lewisnyman’s picture

Issue tags: +needs screen

@Karmen Great thanks, you don't need to put reroll in the patch name, but when you upload a new patch it can help reviewing to upload an interdiff. See: https://www.drupal.org/documentation/git/interdiff

Looks like we need some screenshots of the affected pages to show we haven't introduced any regressions

lewisnyman’s picture

Issue tags: -needs screen +Needs screenshots
lewisnyman’s picture

Issue summary: View changes
Issue tags: -Needs screenshots
StatusFileSize
new462.49 KB
new465.26 KB

Thanks, here are the screenshots:

Before:

After:

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

RTBC

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 33: 2408481-help-33.patch, failed testing.

LewisNyman queued 33: 2408481-help-33.patch for re-testing.

lewisnyman’s picture

Status: Needs work » Reviewed & tested by the community

Ok back to RTBC. Thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This is a CSS only change permitted in beta. Committed 90e7bdd and pushed to 8.0.x. Thanks!

  • alexpott committed 90e7bdd on 8.0.x
    Issue #2408481 by kyuubi, Karmen: Rewrite help.module component's inline...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.