[MGNLUI-1296] In all lists, add a new column "path" showing the path to the item contained in the row Created: 02/May/13  Updated: 03/Jun/13  Resolved: 30/May/13

Status: Closed
Project: Magnolia UI
Component/s: design, tree/list
Affects Version/s: None
Fix Version/s: 5.0

Type: Story Priority: Critical
Reporter: Andreas Weder Assignee: Christopher Zimmermann
Resolution: Fixed Votes: 0
Labels: usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to CNTCTSAPP-19 Update bootstraps as column definitio... Closed
relates to MGNLDAM-238 Update bootstraps as column definitio... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Sprint: Beta 3

 Description   

Reviewer - please discuss with CLZ first. only review top 2 commits (on contentview-columns branch).

Only in lists and the list of search results, add a new column containing the path to the item. We need the path in lists in order to distinguish two items with the same name. It's not enough to just have the breadcrumb, as it always requires you to select an entry first before you know where exactly it's located.

  • A "Path" column should be added between the column showing the item's icon and name and the column showing its title.
    • We do not need this column in the "Messages" list in Pulse.
  • It should be visible by default.
  • If the path it shows is too long, abbreviate it using a middle ellipsis so that the beginning an the end is still visible.


 Comments   
Comment by Christopher Zimmermann [ 07/May/13 ]

Could be useful for the elipses:
http://stackoverflow.com/questions/831552/ellipsis-in-the-middle-of-a-text-mac-style
https://github.com/tbasse/jquery-truncate

Comment by Christopher Zimmermann [ 07/May/13 ]

Otherwise - use CSS3 for an end ellipses:
text-overflow: ellipsis

Comment by Christopher Zimmermann [ 07/May/13 ]

If implementation of middle ellipses is too difficult - what about an html "title" attribute to get a tooltip of the full path after a short delay on the path?

Comment by Samuli Penttilä [ 10/May/13 ]

We go for CSS3 end ellipses for now but one possible improvement would be an idea that we add ellipses statically so that we always show begin and end of path. In this way it's not dotting dynamically based on space available. For example if we use first and last leaf in JCR node tree: /modules/data/dialogs/RssAggregator/mainTab/filters/options-properties/property3 becomes /modules/../options-properties/property3

Comment by Christopher Zimmermann [ 10/May/13 ]

Good news: It works! Bad news: Too inflexible.

I think developers/admins should always have the ability to configure existance and order of columns, rather then having them hardcoded.
I think it should be implemented with bootstraps as with other columns.
To display the path - you could create a new ColumnFormattter modelled after the DateColumnFormatter.
But let me double check on Monday in consultation with other Magnolians.

Comment by Samuli Penttilä [ 13/May/13 ]

Another possible solution is to make path column configurable by a property. As we want it to show up only in the list view's second column it would be confusing to define it as a configurable column. More natural way is to create boolean property for workbench definition like "disablePathColumn=true|false" which would allow it to be hidden on demand.

One thing about current implementation is that it uses itemId.toString() to get the path. Ticket MGNLUI-226 will break this in near future so the path should be obtained in some more sustainable manner.

Comment by Christopher Zimmermann [ 13/May/13 ]

Feedback from ScrumOfScrums and Philipp:
The path column should not be hardcoded - it should be configured as the other columns.
In order to specify which views the column shows up in, a new configuration feature will need to be implemented:
The column should support another property "supressInViews" which accepts a comma delimited list of view names where the column should NOT be included. - such as tree.

Comment by Andreas Weder [ 23/May/13 ]

I really think we need this - search is just not complete without this. There's a workaround in search results to click on an item in order to see where it's located (you see its breadcrumb), but having the path in lists (and only lists) allows you to also sort by path.

Comment by Christopher Zimmermann [ 30/May/13 ]

Implemented based on decisions from Architecture group, that columns move to the content views.

Implementation:

  • Created new PathColumnFormatter to display path.
  • Moved column definitions from WorkbenchDefinition to ContentPresenterDefinition.
  • ContentPresenter's start method now also accepts a text string which is the ViewType.
    • This is used in AbstractContentPresenter.getColumnsIterator() to get the columns for the view.
    • Same logic must be implemented in AbstractJcrContainer, which has identical getColumnsIterator().

A bit silly that both classes have this same method. Suggestions from reviewer?

Comment by Federico Grilli [ 30/May/13 ]

Some remarks after reviewing the issue:
info.magnolia.ui.workbench.ContentPresenter.start(WorkbenchDefinition, EventBus, String)
info.magnolia.ui.workbench.container.AbstractJcrContainer.AbstractJcrContainer(WorkbenchDefinition, String)
and their respective subclasses could take info.magnolia.ui.workbench.ContentView.ViewType as the view type param instead of a String

info.magnolia.ui.workbench.container.AbstractJcrContainer.getColumnsIterator()
could be made private as it used only internally by the same class

Generated at Mon Feb 12 08:45:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.