Lose the Hieroglyphics

Semantic UI empowers designers and developers by creating a language for sharing UI. It is structured around natural language conventions to make development more intuitive.
This theme implements the Semantic UI framework for Drupal.

Features

Out of the box, Semantic UI themes Breadcrumbs, Navbar, Menu, Forms, Pagination, Messages, Buttons, Local tabs and Views tables.

Dependencies

  1. Libraries API - Semantic UI uses Libraries API to to store its code as an external library.
    Please download the latest version of Semantic UI from Github and place the content of the 'packaged' folder in a new libraries folder 'semanticui' within your drupal installation. You should end up with the following folder structure:
    • sites/all/libraries/semanticui
      • css
      • fonts
      • images
      • javascript
  2. jQuery 1.7+ - Semantic UI requires a minimum jQuery version of 1.7 or higher. The preferred method is to install the jQuery Update (version 7.x-2.3 or higher) module. You must also configure the jQuery Update setting to this version after it is installed.

Drupal Core version: 7.x
The link to the project is https://drupal.org/sandbox/culfin/2152101

Git Instructions
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/culfin/2152101.git semantic_ui
cd semantic_ui

The direct link to the GIT Repository for Non-maintainer
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/culfin/2152101.git semantic_ui

Manual reviews of other projects:
https://drupal.org/comment/7048974#comment-7048974
https://drupal.org/comment/7076604#comment-7076604
https://drupal.org/comment/7076568#comment-7076568
https://drupal.org/comment/7137838#comment-7137838

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mukeysh’s picture

Issue summary: View changes
Mukeysh’s picture

Issue summary: View changes
FileSize
156.95 KB
Mukeysh’s picture

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

klausi’s picture

Status: Needs review » Needs work

libraries folder: appears to be 3rd party code. 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access, which you may want to re-read, to be sure you're not violating other terms.

The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.

gobinathm’s picture

Please update you project description to have non-maintainer version of GIT Clone.

Mukeysh’s picture

Issue summary: View changes
Mukeysh’s picture

Issue summary: View changes
Mukeysh’s picture

Issue tags: +PAreview: review bonus

Adding review bonus

Manjit.Singh’s picture

Issue summary: View changes
dman’s picture

FileSize
198.31 KB

First impressions (not a formal review, as it's Friday night here)

The repository looks surprisingly heavy. Heaps of files, including half a dozen 3rd party libraries included - need to see about each of their licensing conditions etc now. These could be a problem unless whitelisted by the d.o repository hosting licensing conditions.
* It's attractive out of the box. Holds together well. Until you look at the way it handles content or the UI.
* it seems to have added a whole bunch of unwanted unconfigurable social media add-ons to my footer. Putting content on our page is not a theme job, that should be provided as a block, and would have the advantage of being positionable etc.
* spacing/padding in the teal footer looks unrefined - the social widgets were top-aligned and the 'copyright' notice was bottom-aligned, no margin, so looked rough.
* weirdness happened to my teasers, the 'read more' obscured the bottom quarter of my teaser content.
* the mobile/narrow navigation hamburger didn't seem to work at all - it popped up halfway down the left when resizing the screen, but clicking it does nothing. I'm not sure what it's expected to do.
* the forms, like on /admin/content were unusable. Somehow the theme totally hid the checkboxes and disabled the selects.
* A number of things appeared to be applied to the node edit UI - but they just made it strange.

This was done on a minimal site, that had a smattering of content - using a custom content type and some FieldAPI fields added - but wasn't twisted in any special way.

That's from 10 minutes with it, just looking at what it did to a minimal Drupal install.

Maybe if you explained the way it was expected to be used, or what advantage this actually was expected to add it would be easier to review.

Mukeysh’s picture

I removed the unnecessary third party files.
Remove the social icon from footer.
You need to install jquery_update module.

Will look into other issues that you mentioned.

@dman Thanks for feedback.

Mukeysh’s picture

Issue summary: View changes
Mukeysh’s picture

Issue summary: View changes
Mukeysh’s picture

Issue summary: View changes

added licence info

Vinay Punyamurthy’s picture

@Mukeysh, let me point out a few issues I encountered in your template.php:

1) Not all your hooks and theme implementations in template.php have the "Implements hook_NAME()" or "Overrides theme_NAME()" comment above them. Please add these as per drupal standards.

2) Consider removing the extra space(s) at the end of L3 and on L57 in template.php. As per https://drupal.org/coding-standards, "Lines should have no trailing whitespace at the end."

3) Please remove the extra newline (\n) at the end in template.php. As coding standards, "All text files should end in a SINGLE newline (\n).

Mukeysh’s picture

@Vinay Punyamurthy these changes has been done.

manumilou’s picture

Hi Mukeysh,

First of all, thank you for contributing this, I like Semantic UI framework!
I did some usability tests and here are some issues that need to be addressed:

- Vertical tabs displays in admin forms are broken, which is a major usabilty problem (see attachment)

- Table with checkboxes (tableselect) that list people, content, etc ... are broken as well. Checkboxes don't display at all.

- Minor: the drag'n drop icon is a little too small to my taste, and makes the action less obvious

Other issues:
- You should probably integrate third-party code with Libraries API module, as mentionned above
- The clone command in the PA summary is still wrong. Use this one instead: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/culfin/2152101.git

Keep up!

Mukeysh’s picture

Issue summary: View changes
culfin’s picture

Issue summary: View changes
Mukeysh’s picture

@manumilou - Vertical tabs and Table with checkboxes issues has been resolved. Please check.

Thanks for your feedback.

manumilou’s picture

@Mukeysh

I confirm that the vertical tabs and the tableselect are now fixed, nice work.

Mukeysh’s picture

Issue summary: View changes
nitishchopra’s picture

Issue summary: View changes
nitishchopra’s picture

Issue summary: View changes
Mukeysh’s picture

Status: Needs work » Needs review
culfin’s picture

Issue summary: View changes
culfin’s picture

Issue summary: View changes
culfin’s picture

Issue summary: View changes
culfin’s picture

FileSize
35.29 KB
culfin’s picture

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxculfin2152101git

I'm a robot and this is an automated message from Project Applications Scraper.

culfin’s picture

Status: Needs work » Needs review

Fixed function prefix with theme name according to
http://pareview.sh/pareview/httpgitdrupalorgsandboxculfin2152101git

izus’s picture

Status: Needs review » Needs work

Hi,
Thanks for your contribution.

here is my review

indentations in template.php, style.js and some selectors in responsive.css are 8 spaces. it should only be 2 according to Drupal recommandations https://drupal.org/coding-standards#indenting

there is a type error in semanticUI_html_head_alter documentation ('heaf' instead of 'head')

Hooks documentation should contain '().' after function name, (per example 'Implements hook_css_alter.' should be 'Implements hook_css_alter().' See https://drupal.org/coding-standards/docs#functions

README.txt should not contain lines with more the 80 characters.

Some template files have the '@file' header but some don't (block.preprocess.inc per example).

Some template files documentation are false, per exemple 'Default theme implementation to display a block.' but it is actually an overrite of the default one.

Thanks again for contributing this new Drupal theme.

Manjit.Singh’s picture

Issue summary: View changes
aprogs’s picture

Status: Needs work » Needs review

Hi,
thanks for reviewing this application.
Next things were fixed in the latest update:
1. code indentations in template.php and style.js files
2. updated documentation for template files (changed "Default theme ..." to "Semantic UI theme ...").

mpdonadio’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

Automated Review
----------------

OK.

PAR Checklist
-------------

Normalize.css is included, but it is MIT. Other themes include this (like Omega). OK. Per https://drupal.org/node/422996, though MIT is considered GPL-compatible, it is not allowed and needs to be removed.

Else is OK, unless mentioned below.

Code Walkthrough
----------------

As dependencies aren't supported in themes yet (https://drupal.org/node/474684), I would add them commented out to the .info.

SASS for the CSS would be nice.

(*) The JS doesn't follow Drupal best practices (eg, no behaviors). See https://drupal.org/node/751744

(*) semanticUI_preprocess_block should add each class individually. Also elsewhere.

The file is called block.preprocess.inc, but you also have the process function there? This is confusing.

(*) semanticUI_breadcrumb() should call check_plain() instead of strip_tags().

(*) Per https://drupal.org/requirements, the minimum version for Drupal 7.x is PHP 5.2.5. semanticUI_preprocess_field
has an anonymous function, which were introduce in PHP 5.3.

(*) Use drupal_html_class() and drupal_html_id() instead of your own scheme for cleaning up classes (eg, in semanticUI_form_element()).

(*) filter_xss_admin() in semanticUI_form_element_label() is too permissive. check_plain() it.

(*) Why are polyfills handled that was in semanticUI_preprocess_html()? hook_page_alter() is probably a better place, but check how other themes (like Omega) handle this. No documentation about the polyfills?

semanticUI_preprocess_page(), use user_is_anonymous instead of poking around in $user.

semanticUI_preprocess_page() has some untranslated strings.

Commented out code should be removed for production.

The logic in forum-icon.tpl.php should be moved to a preprocess. Also elsewhere.

You have hardcoded metas in html.tpl.php

semanticUI_html_head_alter() adds the viewport, but you have this hardcoded in html.tpl.php

Why the explicit content type in semanticUI_html_head_alter?

The starred items (*) are fairly big API issues, as they will hamper anyone who wants to subtheme this. These warrant going back to Needs Review. The rest of the comments in the code walkthrough are recommendations.

Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

aprogs’s picture

Status: Needs work » Needs review

Thanks for your review and detailed answer, it is very helpful.

Noticed points and warnings have been fixed.
What about polyfills in another themes: for example in Omega they use custom libraries implementation and load JavaScript and css files with them (sub-theme can implement hook hook_omega_theme_libraries_info() and specify which libraries will be loaded).
So, I moved IE-related JavaScript and css files to Drupal renderable array instead of hardcode.

heddn’s picture

Issue summary: View changes
heddn’s picture

Status: Needs review » Needs work

.js:

      $('img').each(function() {
        $(this).removeAttr('width')
        $(this).removeAttr('height');
      });
Drupal.behaviors.semantic = {
    attach: function() {
...
    }
  }

These could all use a semicolon;

(*) Naming the project semantic_ui, then calling the theme semanticUI is problematic for subtheming. It isn't clear to a subthemer what they should list as the base theme. And the standard for projects/themes is to use underscores rather than camel case for the machine name. Please rename the .info file and other places. The friendly name (semanticUI) can stay the same.

require_once dirname(__FILE__) . '/preprocess/block.preprocess.inc';
require_once dirname(__FILE__) . '/preprocess/html.preprocess.inc';

module_load_include should be used.

The starred item (*) is a fairly big API issue, as it will hamper anyone who wants to subtheme this. It warrants going back to Needs Review. The rest of the comments in the code walkthrough are recommendations.

mpdonadio’s picture

module_load_include() shouldn't be used at the top level per the API docs, so require_once is acceptable. The alternate is to use hook_theme_registry_alter() to add them.

culfin’s picture

Issue summary: View changes

Thanks for reviewing the theme. This helps a lot to push the code forward and make it better :-)

I tried to use the word semanticUI instead of semantic_ui because I find it more compact and readable in longer function names like semanticUI_html_head_alter. So if it's only a recommendation not to use camelCase when naming projects, i would be happy if I could leave it as it is. But if it's against Drupals coding standards, I would definitely change it. In this case, could you please post a link where I can find this explicit naming convention?
In the meantime I tried to update the complete code to use semanticUI. Please tell me if I missed something (for example I'm not sure where the theme was named semantic_ui, as you mentioned).

For the other things like JS optimization and using hook_theme_registry_alter() to load the inc files, I hope aprogs will look into this.

culfin’s picture

Issue summary: View changes
aprogs’s picture

Hi @mpdonadio,

The alternate is to use hook_theme_registry_alter() to add them.

Do you mean include file with preprocess / process hooks in hook_theme_registry_alter()?
If so, I tried this case, but file gets included after caches were cleared and hooks do not get called.

Example code:

  if (isset($theme_registry['block'])) {
    $theme_registry['block']['includes'][] = $theme_path . '/preprocess/block.preprocess.inc';
  }

I also tried specify preprocess / process functions directly in the "preprocess functions" / "process functions" array. This case works.

  if (isset($theme_registry['block'])) {
    $theme_registry['block']['includes'][] = $theme_path . '/preprocess/block.preprocess.inc';
    $theme_registry['block']['process functions'][] = 'semanticUI_process_block';
  }

But I'm just curious, is this correct way and if this is better than using require_once language construct?

Thanks

culfin’s picture

Status: Needs work » Needs review

Please note that in the latest dev version the folder in which the Semantic UI should be placed should be named "semanticUI" (was "semantic" before). This was changedto have a proper naming consistency in the complete theme.

mpdonadio’s picture

I would have to find some example code for doing this. The Omega base theme does it. The advantage it that is can lower the memory footprint for page request (if a preprocess isn't used for a page, then the code won't be loaded).

mpdonadio’s picture

Status: Needs review » Needs work

Took a look at the starred issues that I mentioned above.

(*) Per https://drupal.org/node/422996, you need to remove normalize.css. Line 1 is a MIT license header.

Your JS behavior should use the context that is passed in. This is important for AJAX. Also use .once() where appropriate.

semanticUI_breadcrumb(), you don't need the strip_tags(). check_plain is fine.

The elements that you are making in semanticUI_preprocess_html() would normally be done in hook_html_head_alter().

aprogs’s picture

Status: Needs work » Needs review

Hi,

thanks for reviewing and providing detailed answers. Notices and warning have been fixed in latest commits.

I would have to find some example code for doing this. The Omega base theme does it.

thanks for pointing me out, I found how they do it and implemented lightweight case of including files. Also, I created preprocess/process folders to hold files there.

semanticUI_breadcrumb(), you don't need the strip_tags(). check_plain is fine.

First time I added just check_plain() as you suggested earlier, but noticed that there is unnecessary _em_ tag in the title (e. g. at the node edit page you will see _em_Edittest Forum topic_/em_ Test subject). This tag is added in function node_page_edit() (that is in the file node.pages.inc). Do you know the way in which this em tag can be removed?

Thanks

aprogs’s picture

FileSize
49.94 KB

Attached screenshot with title which contains em tag.
Title with em tag

mpdonadio’s picture

Status: Needs review » Needs work

Breadcrumb. I poked around a little. Your usage is OK. See template_preprocess_html() and template_process_page() for two places where drupal_get_title() is used.

Thanks for removing normalize.css. The licensing issue is a big deal.

(*) Name. I cannot point you to a definitive reference, but camel case is not used except for files where the filename is the same as the class name. There may be exceptions to this, but consider it a defacto standard. The friendly name can stay semanticUI. You need to make the choice between semantic_ui and semanticui for your project namespace. Either is fine. Once you take care of this, I can give you a prompt, full review again, and it looks like you are close to RTBC.

culfin’s picture

Issue summary: View changes

In the latest commit I changed all naming to semanticui. The theme name in the info file is now SemanticUI, all other references have been renamed.
I hope I did it right. :-)

aprogs’s picture

Status: Needs work » Needs review

Seems that latest notices and warnings were fixed.

klausi’s picture

Assigned: Unassigned » mpdonadio
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch:

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/js/style.js
    --------------------------------------------------------------------------------
    FOUND 11 ERRORS AFFECTING 11 LINES
    --------------------------------------------------------------------------------
       1 | ERROR | Missing file doc comment
      29 | ERROR | Inline comments must start with a capital letter
      32 | ERROR | Inline comments must start with a capital letter
      40 | ERROR | Inline comments must start with a capital letter
      45 | ERROR | Inline comments must start with a capital letter
      49 | ERROR | Inline comments must start with a capital letter
      52 | ERROR | Inline comments must start with a capital letter
      60 | ERROR | Inline comments must start with a capital letter
      68 | ERROR | Inline comments must start with a capital letter
      75 | ERROR | Inline comments must start with a capital letter
     124 | ERROR | Inline comments must start with a capital letter
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. oh, this is a theme! From the project page it sounded like a module that would enhance the UI elements somehow. Please add to the project page that this is a theme.
  2. It seems that culfin opened this project application, but has no commits on the git repository? I would propose that we give the git vetted user role to aprogs, since she/he seems to be the recently active one maintainer? I'll change the application author to aprogs, let me know if this is a mistake.

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to mpdonadio as he might have time to take a final look at this.

PA robot’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://drupal.org/node/2211003

Project 2: https://drupal.org/node/2274889

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

klausi’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

Whoops, the author change of the application triggered this. Let's continue here!

mpdonadio’s picture

This is next up in my queue of reviews to do. It will either be later tonight or tomorrow mid-day (I'm EDT).

When I do a git log on a fresh clone, I am seeing two recent users: culfin and aprogs. Please confirm who would get the vetted user status.

mpdonadio’s picture

Automated Review

Looks like false positives.

Manual Review

Fill out the README a little more to provide info about how to install the semantic UI library, and the other libraries. Do the same for the project page.

Remove the console.log() from the JS.

The text replacement in semanticui_preprocess_search_block_form() will be a little fragile in the long run. It may also end up catching
things it shouldn't.

forum-topic-list.tpl.php has a filter_xss() in it. I would move this to a preprocess.

Will html.tpl.php work with the RDF module?

After looking at the .tpl.php files, there are a lot of

s. I would see if you can work in some of the semantic HTML5 elements where appropriate.

In the theme settings, it is best to build the link outside of the t(), and pass it in as a placeholder.

Overall, I think this needs some polishing for prime-time, but nothing to prevent promotion. Once the proper account gets identified, I'll mark as fixed and assign the veted user status.

PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2211003

Project 2: https://www.drupal.org/node/2274889

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

aprogs’s picture

Hi,

thanks for detailed answer, it is very helpful.
May I ask you to explain what do you mean with:

After looking at the .tpl.php files, there are a lot of s. I would see if you can work in some of the semantic HTML5 elements where appropriate.

mpdonadio’s picture

Sorry, looks like I forgot to escape that. There are a lot of <div> elements being used. I would see if you can work in some of the semantic HTML5 elements where appropriate.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, aprogs and other contributors!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

mpdonadio’s picture

Assigned: mpdonadio » Unassigned

Unassigning myself.

Status: Fixed » Closed (fixed)

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