Follow-up to #1342054: [META] Clean up templates and CSS

Problem/Motivation

  1. Bartik's template files need to be assessed and cleaned up of redundant markup, bad formatting and ID's.
  2. Bartik's CSS files need to follow Drupal's CSS Coding Standards.

Proposed resolution

For this issue we take "views.css" within Bartik in css/components/views.css plus any template file associated with the CSS and clean them up.

Formatting tasks to do

  1. Remove blank lines where necessary - guidelines are here.
  2. The CSS file needs to have the correct Comment formats - see guidelines here and also reference other fixed Bartik CSS files for wording guidelines.

CSS cleanup tasks to do

  1. Remove any CSS that repeats styles from elsewhere in Bartik and therefore are not needed in this file.
  2. Check all of the selector rules are correct and are currently in use on the frontend of Bartik.

Remaining tasks

  • Write a patch containing as much as the above as possible.
  • Post a patch with screenshots.
  • Visual review of a patch - check the elements being styles visually, with and without patch applied. Take screenshots.
  • Code review of a patch - check the code follows coding standards, suggest improvements if needed in a comment.
  • Produce a new patch with improvements if needed.

User interface changes

None

API changes

None

Data model changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it is refactoring CSS and templates in Bartik
Issue priority Not critical because Bartik functions fine we are just doing cleanup tasks
Unfrozen changes Unfrozen because it only changes CSS and markup
Prioritized changes The main goal of this issue is usability of the Bartik's codebase
Disruption non-Disruptive as it is just changing markup and CSS
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Manjit.Singh’s picture

Assigned: Unassigned » Manjit.Singh
Manjit.Singh’s picture

Assigned: Manjit.Singh » Unassigned
Status: Active » Needs review
FileSize
369 bytes
emma.maria’s picture

I noticed that there was a lot of redundant CSS code, selectors that could be improved, a lot of code that was being overwritten by the Views module that I made kick in / got rid of as it was not needed, and declarations of styles to improve.

As the list of improvements to make was going to be a huge list I knocked up a patch myself.

Patch and interdiff attached.

emma.maria’s picture

Because the changes are big I have attached a visual regression report to show what's going on in the frontend.

There is only one difference which is an improvement.

Before

After

A code review is much needed please :)

LewisNyman’s picture

Status: Needs review » Needs work

Great, I can confirm that there are no visual regressions. Just a few questions:

.views-display-column summary {
  text-shadow: none;
}

Why are we disabling this styling for a summary in this particular occasion? It feels inconsistent for the sake of it.

[dir="rtl"] .views-displays .tabs .action-list {
  padding-left: inherit;

This doesn't work as expected, as the styling is directly overriding from .region-content ul, .region-content ol. Usually in these situations we have to set the padding again but I would just remove all padding so you don't have to set it again for RTL.

/* Tabs action list styles */
.views-displays .tabs .action-list {
  padding: 0;
}
emma.maria’s picture

Status: Needs work » Needs review
FileSize
777 bytes
3.2 KB

I agree with the first point. Bartik declares the summary styling so we shouldn't override it just for Views.
Also good spot on the padding of .views-displays .tabs .action-list. I wondered what was going on there, padding: 0 creates no visual regressions.

I have made the changes in this patch.

PS. should we capitalise 'Views' in the file comment?

emma.maria’s picture

I added the capital letter to "Views" in the file comment. All other feedback has been addressed. Can someone please final check this for me?

LewisNyman’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
50.28 KB
30.35 KB

Great, thanks for making these changes. I can confirm there are no regressions.


Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: clean_up_the_views-2542600-7.patch, failed testing.

rudraram’s picture

Status: Needs work » Needs review
rudraram’s picture

Status: Needs review » Reviewed & tested by the community

Re-test passed so RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2c62403 and pushed to 8.0.x. Thanks!

  • alexpott committed 2c62403 on 8.0.x
    Issue #2542600 by emma.maria, Manjit.Singh, LewisNyman: Clean up the "...

Status: Fixed » Closed (fixed)

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