Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Fix EZP-27144: Current location not viewable when content browsing #833

Merged

Conversation

StephaneDiot
Copy link
Contributor

jira : https://jira.ez.no/browse/EZP-27144

Description

When a user wanted to browse with the finder the current location where he currently was this was resulting in an infinite loading. Now the user can only select another location than the one he is on ( or cancel to stay on it obviously )

Screencast

https://youtu.be/w5M2Wfygc_8

Tests

Manually and unit tested

@StephaneDiot StephaneDiot force-pushed the Fix-EZP-27144_Selecting_current_location_in_finder branch from 11b8614 to 2183d6b Compare April 4, 2017 13:36
@@ -60,6 +60,12 @@ YUI.add('ez-discoverybarviewservice', function (Y) {
startingLocationId: startingLocationId,
minDiscoverDepth: rootDepth,
confirmLabel: Y.eZ.trans('view.content.label', {}, 'bar'),
isSelectable: function(contentStruct) {
if (startingLocationId === contentStruct.location.get('id')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be simplified (and cs issue, missing space after function):

isSelectable: function (contentStruct) {
    return startingLocationId !== contentStruct.location.get('id');
}

Assert.isFunction(e.config.isSelectable, "config should have a function named isSelectable");

Y.Assert.isTrue(
e.config.isSelectable({location: otherLocation}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add 2 new test cases that would call the isSelectable function and make sure the starting Location can not be selected and any other Location is selectable.

@StephaneDiot
Copy link
Contributor Author

Updated ping @dpobel @yannickroger

Copy link
Contributor

@dpobel dpobel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides the remaining CS issue

@@ -60,6 +60,9 @@ YUI.add('ez-discoverybarviewservice', function (Y) {
startingLocationId: startingLocationId,
minDiscoverDepth: rootDepth,
confirmLabel: Y.eZ.trans('view.content.label', {}, 'bar'),
isSelectable: function(contentStruct) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space still missing after function ...

@StephaneDiot StephaneDiot force-pushed the Fix-EZP-27144_Selecting_current_location_in_finder branch from 28aaace to a80dbe3 Compare April 10, 2017 13:54
Copy link
Contributor

@yannickroger yannickroger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with base branch 1.9

@StephaneDiot StephaneDiot changed the base branch from master to 1.9 April 10, 2017 14:19
@StephaneDiot StephaneDiot merged commit 67dfe1e into 1.9 Apr 11, 2017
@dpobel dpobel deleted the Fix-EZP-27144_Selecting_current_location_in_finder branch April 19, 2017 12:05
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants