Skip to content
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

Sort on y-axis in listview config layouts #8422

Conversation

bjarnef
Copy link
Contributor

@bjarnef bjarnef commented Jul 11, 2020

Prerequisites

  • I have added steps to test this contribution in the description below

Description

This PR restrict sorting on y-axis and within parent element. I also noticed the remove button no longer was rendered for custom listviews, because of the self-closing <umb-checkbox ng-if="layout.isSystem === 1" model="layout.selected" />. Changing this to <umb-checkbox ng-if="layout.isSystem === 1" model="layout.selected"></umb-checkbox> fixes this issue.

chrome_2020-07-11_17-33-01

Previous it looked like this as the GIF in this PR:
#5405

In both umb-checkbox and umb-radiobutton I noticed the label had child <div> elements, which isn't valid for <label>, so changing this to <span> instead.

Finally the "Add layout" button is also removed outside the sortable placeholder, so it isn't part of the sortable area.

2020-07-11_17-52-08

@bjarnef bjarnef marked this pull request as ready for review July 11, 2020 15:52
@nul800sebastiaan nul800sebastiaan merged commit 39da781 into umbraco:v8/contrib Jul 14, 2020
@nul800sebastiaan
Copy link
Member

Wonderful @bjarnef! Since 8.7.0 has been closed for additional changes, I'll mark this for 8.7.1 - we'll need to cherrypick this one after 8.7.0 release.

@bjarnef
Copy link
Contributor Author

bjarnef commented Jul 25, 2020

@nul800sebastiaan was this one merged correctly to v8/contrib branch?
I see some of the changes here, but not this change which changed this self-closing umb-checkbox:
https://github.com/umbraco/Umbraco-CMS/pull/8422/files#diff-c84512d9cc059db603911cd477e1d82eR34

Since angular element directives/components are custom HTML elements, they can't be self-closing elements like native elements like e.g. <input type="checkbox" value="" />
https://stackoverflow.com/a/25012451/1693918

At the moment it isn't possible via the backoffice UI to remove custom listview layouts, because the umb-checkbox isn't rendered correct.
https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts.prevalues.html#L34

image

@bjarnef
Copy link
Contributor Author

bjarnef commented Jul 25, 2020

@nul800sebastiaan okay, it was merged, but overwritten again when you merged the PR from @BatJan 1cd79d8#diff-c84512d9cc059db603911cd477e1d82e

I have submitted a new PR to fix this: #8478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants