New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable12] Fix tag label removed when share view is opened #5379

Merged
merged 7 commits into from Jun 13, 2017

Conversation

Projects
None yet
3 participants
@danxuliu
Member

danxuliu commented Jun 13, 2017

Backport of #5310

danxuliu added some commits Jun 9, 2017

Add acceptance tests for showing the input field for tags
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Extract duplicated code to a method
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Make possible to know the registered detail views in a details view
In some cases, an app may need to act on a detail view registered by
another app or the core, for example, to add extra elements to the
element of the detail view.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Trigger pre and post render events in MainFileInfoDetailsView
The post-render event makes possible to modify the
MainFileInfoDetailsView element once it has been rendered, which is
needed by OCA.SystemTags.FilesPlugin to add the "Tags" label to the file
details, while the pre-render event makes possible to detach added
elements if needed before the MainFileInfoDetailsView is rendered again,
as that removes the events from the child DOM elements even if they
belong to other views.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Add visibility related methods
SystemTagsInfoView now provides public methods related to its visibility
in preparation to be used by external objects.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fix toggle element being removed when MainFileInfoView is rendered again
The toggle element was added to the MainFileInfoView element when
SystemTagsInfoView was rendered. However, if the MainFileInfoView was
rendered again after that the toggle element was removed. Therefore,
instead of adding it when SystemTagsInfoView is rendered, the toggle
element has to be added when MainFileInfoView triggers its "post-render"
event.

Note, however, that when MainFileInfoView is rendered all the events are
removed from its child elements. As the toggle uses a "click" event
either the event has to be added back or the element has to be detached
before the MainFileInfoView is rendered.

Fixes #4944

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Extract toggle visibility of a SystemTagsInfoView to its own view
The SystemTagsInfoViewToggleView is a basic view that renders a label
that, when clicked, toggles the visibility of an associated
SystemTagsInfoView.

In order to keep the view parent agnostic its attachment and detachment
to/from the MainfFileInfoView is done in the FilesPlugin.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>

@MorrisJobke MorrisJobke added this to the Nextcloud 12.0.1 milestone Jun 13, 2017

@MorrisJobke

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 4fec6db into stable12 Jun 13, 2017

0 of 2 checks passed

continuous-integration/drone/pr the build failed
Details
continuous-integration/drone/push the build failed
Details

@MorrisJobke MorrisJobke deleted the stable12-5310-fix-tag-label-removed-when-share-view-is-opened branch Jun 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment