User menu: usability and semantic improvements

Project:ProjectPier
Version:0.8.0.2
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch - code needs review
Description

This patch improves the usability and semantic of the top user navigation (userbox).
Current menu has 3 problems:

  • It is not clear that the small arrows are anything but decoration, there is nothing to indicate they are clickable, and clicking is not an expected action for the user.
  • For experienced users, the clickable area is too small.
  • Menu is not semantic and will not work with javascript off.

Patch fixes this:

  • By making the menu work on mouseover instead of on click.
  • Making the whole link (text and background)a target area, and not just the arrow.
  • Making the menus nested lists (ul, li), which makes the markup more semantic
  • Making the menus work without javascript (exception: internet explorer 6 and below)

Can/should be used with the Marine Theme

AttachmentSize
pp_dropdowns.patch10.87 KB

Thanks for this. I am excited to try your new theme! I tried running this patch, using the instructions that you posted and placing the patch in the main directory of my PP install. It balked though:

[dogtown]$ patch -b < pp_dropdowns.patch
(Stripping trailing CRs from patch.)
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
-bash: [dogtown]$: command not found
[dogtown]$ (Stripping trailing CRs from patch.)
-bash: Stripping: command not found
[dogtown]$ can't find file to patch at input line 5
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> |Index: application/layouts/account.php
> |===================================================================
> |--- application/layouts/account.php    (revision 1)
> |+++ application/layouts/account.php    (working copy)
> --------------------------
> File to patch:
[dogtown]$

application/layouts/account.php is where it should be, so I assume there is some other problem in the way I'm doing it. Any advice?

Thanks QUITE a bit!
benshead.

ben, I'm new at this patch thing myself, but does it make any difference if you try
$ patch -b -p0 < pp_dropdowns.patch
?

Kemie-

Thanks for the response. Maybe someone else can chime in, though it's probably a good chance for me to try and learn more about patch.

I tried your suggestion and get a different collection of error messages:

[dogtown]$ patch -b -p0 < pp_dropdowns.patch
(Stripping trailing CRs from patch.)
patching file application/layouts/account.php
Hunk #1 FAILED at 9.
1 out of 1 hunk FAILED -- saving rejects to file application/layouts/account.php.rej
(Stripping trailing CRs from patch.)
patching file application/layouts/administration.php
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file application/layouts/administration.php.rej
(Stripping trailing CRs from patch.)
patching file application/layouts/dashboard.php
Hunk #1 FAILED at 9.
1 out of 1 hunk FAILED -- saving rejects to file application/layouts/dashboard.php.rej
(Stripping trailing CRs from patch.)
patching file application/layouts/project_website.php
Hunk #1 FAILED at 14.
1 out of 1 hunk FAILED -- saving rejects to file application/layouts/project_website.php.rej
(Stripping trailing CRs from patch.)
patching file application/views/application/user_box.php
(Stripping trailing CRs from patch.)
patching file public/assets/javascript/dropdown.js
[dogtown]$

So it looks like application/views/application/user_box.php and public/assets/javascript/dropdown.js both were successfully patched (checking the files corroborates this) but that the others were not. Very interesting. I wonder what is the difference.

Also, am I missing something or have you not released the theme code for Marine yet? Do you know when that will be available?

Thanks so much!

weird that it would work for some files but not others. Sorry, I don't think I can help any more with that, hopefully someone with more experience can see if it's an error with my file or the way you're patching :). As a last resort, it should not be too hard to patch the remaining files by hand
If you open the patch in a text editor, line numbers and all should be there, and the remaining changes are small (if i'm not mistaken, it's basically adding a link to the js file on several pages).

On other news, the theme has been released! :)

Thanks Kemie!

I'm new at all of this, but I wonder if it matters that I wasn't using a version of PP from SVN, just the most recent official release.

At any rate, I followed your advice and manually patched. It did not take long and was almost fun.

Thanks for all of your help! And this great theme. I am rolling out my first PP site to users in a week and I am so pleased to have such a clean, professional theme!

Well done

benshead, it should not matter, cause the patch was mande from/for the release, not the svn version. anyway, hopefully some techie can take a look and see if anything's wrong

I just made a little improvement in your patch that now correctly applies against 0.8.0 final sources.
Find the file in attachment below.

Usage:
patch -p1 < ../pp_dropdowns_fix.patch

Anyway Kemie your theme is SO cool, that's a really nice enhancement!!!

Let me know if something wrong with the patch ;)

AttachmentSize
pp_dropdowns_fix.patch11.15 KB

hey tux, your patch seems to be from outside the ppier folder rather than from the ppier root. I'm not sure if this is better. I would really like someone with more experience to take a look :)

Thanks!

Yeah that's an habit, i always do my patches like this :)
That's almost the same thing except you call the patch from inside the source dir.

Let me know if you prefer another way ;)

There's another probkem in application\views\user\user_card.php
9th line
-

<?php
echo lang('title')
?>

:

<?php
echo $user->getTitle() ? clean($user->getTitle()) : lang('n/a')
?>

+

<?php
echo lang('user title')
?>

:

<?php
echo $user->getTitle() ? clean($user->getTitle()) : lang('n/a')
?>

I think this is 'user title' - mr mrs...
In user edit form used 'user title' but in view 'title'

#10 post moveв to separate issue http://projectpier.org/node/618

When applying the patch all apply except for one:

[ermac]$ patch -p0 < pp_dropdowns.patch
patching file application/layouts/account.php
patching file application/layouts/administration.php
patching file application/layouts/dashboard.php
patching file application/layouts/project_website.php
patching file application/views/application/user_box.php
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file application/views/application/user_box.php.rej
patching file public/assets/javascript/dropdown.js
[ermac]$

Could someone please simply pass me a patched copy of user_box.php?

Many thanks!

For anyone who has trouble with the patch, here's the patched files

AttachmentSize
patched_files.zip8.89 KB

Yay! thanks for the files.... copying them into their appropriate locations worked perfectly. For some reason had the same problems with the user_box.php and dropdown.js files as well. This worked perfectly. I really like the theme too!

Note that once you apply this path if you switch back to an old theme the menu is jacked up. In my opinion it is worth it though as this theme is the badness.

I have updated the construction.css file of each one of the current themes so they will work with the changes proposed in this patch.

To view the new layouts

Unzip the file here http://2catdesigns.com/corey/projectpier/theme_updates/themes.zip and overwrite the other themes construction.css

That is...
acSimple/construction.css overwrites
public/assets/themes/acSimple/stylesheets/general/construction.css

I made a couple of improvements to the old themes and created a patch file for all the themes at once.

AttachmentSize
theme_updates.patch115.61 KB
Version:» 0.8.0.2

Issue with the patch possibly or I am doing something wrong?

[x0bemane]$:patch -p0 < theme_updates.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: goCollab/Trunk/stylesheets/general/construction.css
|===================================================================
|--- goCollab/Trunk/stylesheets/general/construction.css (revision 154)
|+++ goCollab/Trunk/stylesheets/general/construction.css (working copy)
--------------------------
File to patch:

Unsure what I should put in the "File to patch" prompt.

Could it just be that you don't have the gocollab theme? I'm usually using downloads from the SVN repository, which means I don't have the themes. I don't know if you do the same.

The patch for all the themes can actually cause problems in that situation...

Hi phpuser,

I would like to patch my project pier installation, but I cannot find the patch utility on my SUSE Linux system. I googelt for the utility, but as you can imagine the word "patch" exists a couple of times. Can anyone give me a hint where to find that patch utility?

Thanks a lot!

hman

Title:User menu: usability and semantic improvements» The problem is SVN...

The patch was created against a pull from SVN. To apply the patch to stable, you need to remove all of those "Trunk" path components.

The attached file should work. To apply it:

prompt>cd /path/to/projectpier/public/assets/themes
prompt>patch -b -p0 < /pathto/pathchfile/theme_updates_nosvn.patch

You can always do a dry run first to see what will happen:

prompt>patch --dry-run -p0 < /pathto/pathchfile/theme_updates_nosvn.patch

Hope that helps.

AttachmentSize
theme_updates_nosvn.patch115.46 KB
Title:The problem is SVN...» User menu: usability and semantic improvements

Please be careful when making a reply to an issue - changing the title will change the issue's title ;)

Sorry about that. Where do I file a bug report? ;)

The good news is that I have an update to this patch. This patch works on the following release: projectpier-0.8.0.2

The patch combines the previous dropdowns patch with the themes patch. You MUST install the marine theme first before applying this patch (since I had the theme installed when I created the patch).

To apply the patch...

prompt>cd /path/to/projectpier
prompt>patch -b -p1 < /pathto/pathchfile/pp_mega.patch

You can always do a dry run first to see what will happen:

prompt>patch --dry-run -p1 < /pathto/pathchfile/pp_mega.patch

AttachmentSize
pp_mega.patch207 KB

The latest pp_mega.patch does successfully run, but breaks my Marine theme completely (doesn't load any CSS). All the other themes still work though - with the drop down menus too.