Confluence search filter box - increase width to enable the reading of long space names

AM July 29, 2012

Sometimes you need to limit a Confluence 4.x search to specific space.

But with a lof spaces, names becomes longer :-( than the space list box width.

There is space left, so any ideas who to increase the width?

I'm not a how-to-modify-Confluence-CSS expert %-} , so I would appreciate a detailed how :-)

A-M

2 answers

2 votes
Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2012

Hi there,

In order to make it looks neat, I recommend increasing the width of the whole search bar rather than just increasing the width of your "All Spaces" field.

Please try the following steps and see if it helps:

  1. Access Confluence Adminsitrator Page
  2. Under the "Look & Feel" section navigate to "stylesheet" menu
  3. Click "Edit" and input the following value
  4. #search-sidebar {width:300px !important;}
  5. Saved

Now your whole search bar should be wider to facilitate the long space name. Please modify the px (pixel) parameter appropriately as you preferred.

Please do let me know if you need to modify only the space name, there might be some trick that might help you achieve it.

Hope it helps.

Cheers,
Septa Cahyadiputra

EDITED:

I have double check with a long name and apparently the above CSS won't help as it will only made the bar wider but the name itself is still limited from the source code.

Here is the list of improvement request regarding this issue:

https://jira.atlassian.com/browse/CONF-16270

https://jira.atlassian.com/browse/CONF-15777

1 vote
RianA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2012

Hi,

On top of Septa's Answer, as you know Confluence will only limit the Space name to 20 character, in search filter panel. Despite you increase the CSS, it will just show ellipsis instead of the full name of Space.

We've found the cause of this issue in <tt>SpacePickerHelper.java</tt>, in <tt>com.atlassian.confluence.search</tt>. The variable is only defined as 20, which is very less.

If you know how to edit the source code, you could try and change the following variable to maybe 50, and compile Confluence source.

private static final int MAX_SPACE_NAME_LENGTH = 20;

Hope this helps

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events