Opened 15 years ago

Last modified 11 years ago

#323 closed defect (FIXED)

Tags list on Edit page is not seperated by spaces and hard to read

Reported by: Jef van Schendel Owned by: Manolinux aka Mu
Priority: minor Milestone: 0.2.0
Component: programming Keywords:
Cc: Parent Tickets:

Description

On the Edit page for any media, the "Tags" field look like this, no matter if you used commas, spaces or both:

tag1,tag2,tag3,tag4

Instead, it could use some space between the tags to make it more readable:

tag1, tag2, tag3, tag4

I've also changed the tag list on media pages to "Tagged with tag1, tag2, tag3, etc", so if we change this they will be consistent in appearance.

Change History (8)

comment:1 by Manolinux aka Mu, 15 years ago

It is easy to add a whitespace:

-        media_tag_string = mg_globals.app_config['tags_delimiter'].join(
+        media_tag_string = (mg_globals.app_config['tags_delimiter']+u' ').join(
                                       [tag['name'] for tag in media_entry_tags])

but I am unsure about something.

'tags_delimeter' is parametrized but, do you want to make the whitespace "hardcoded"? I think it is ok, but I want to be sure.

comment:2 by Christopher Allan Webber, 15 years ago

You're right mano, shouldn't be too hard.

However I think we agreed on IRC that we were going to drop the custom-delimiters. I marked #678 as related. Someone interested could probably wrap these up in one simple swoop by doing ', '.join() instead and removing the custom delimiter stuff.

comment:3 by Manolinux aka Mu, 15 years ago

That would be easy because I think 'tags_delimiter' is only used twice in all code.

But, are you sure you want to put only ', ', it is similar to a magic number. Suppose you want to change the delimiter tomorrow, you would need to search for commas inside the code (madness) instead of searching for tags_delimiter, wich would be more reasonable.

Maybe we could use a constant if you don't want it to be customizable.

Anyway, could you please assign this bug to me?

comment:4 by Elrond, 15 years ago

Owner: set to Manolinux aka Mu

Added you as Hacker,Reporter so that we (and you yourself) can assign you to some issues. And assigned this issue to you.

comment:5 by Manolinux aka Mu, 15 years ago

Status: NewIn Progress

I pushed the fix to my repository: git@gitorious.org:~manolinux/mediagoblin/manolinuxs-mediagoblin.git

Finally I defined a constant in the same text.py.

I modified a test that expected the tags as 'yin,yang' instead of 'yin, yang'.

I also took care of http://bugs.foocorp.net/issues/678

comment:6 by Manolinux aka Mu, 15 years ago

Status: In ProgressFeedback

I forgot to say the branch name is 671_spaces_in_tag_list_edit

comment:7 by Elrond, 15 years ago

Milestone: 0.2.0
Status: FeedbackClosed

Merged. Thanks!

comment:8 by Will Kahn-Greene, 14 years ago

The original url for this bug was http://bugs.foocorp.net/issues/671 .
Relations:
#329: related

Note: See TracTickets for help on using tickets.