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

Use the umbConfirmAction directive when deleting tags #2795

Merged
merged 4 commits into from
Jul 27, 2018
Merged

Use the umbConfirmAction directive when deleting tags #2795

merged 4 commits into from
Jul 27, 2018

Conversation

BatJan
Copy link
Contributor

@BatJan BatJan commented Jul 27, 2018

Prerequisites

Description

Instead of deleting a tag once it's being clicked then let's make use of the umbConfirmAction directive so the tag does not disappear immediately if it was clicked by mistake. This also make the UI make use of the "Are you sure you want to do this?" convention.

OBS: It's still a little work in progress! I'll add a comment when I think it's ready for review :)

@BatJan
Copy link
Contributor Author

BatJan commented Jul 27, 2018

Ok, so now this PR is ready to review.

I changed the default behavior so it now provides the editor with an option to regret hitting the delete icon. The behavior can be seen in this video https://www.youtube.com/watch?v=AteKF5jMKfA&feature=youtu.be

First I click the delete icon, and then the checkmark to delete it. Then I click the delete icon on another tag bug this time hit the "x" to regret. I also demonstrate that nothing happens if I just click on the tag itself. It used to be deleted when doing that.

I also added a dictionary item used for the "title" attribute on the tag so the user can get a little hint when holding the mouse over the delete icon.

Please let me know if any changes are requested :)

position: relative;
right: -6px;
}
.umb-tags input{border: none; background: @white;}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe restructure this to the following? :)

.umb-tags {
    border: @gray-10 solid 1px;
    padding: 10px;
    font-size: 13px;
    text-shadow: none;

    .tag {
        cursor: default;
        padding: 10px;
        background: @turquoise;
        position: relative;

        .icon-trash {
            cursor: pointer;
            padding: 2px;
            font-size: 12px;
            position: relative;
            right: -6px;
        }

        .umb_confirm-action__overlay.-left {
            top: 6px;
            left: auto;
            right: 15px;
        }
    }
    
    input {
        border: none;
        background: @white;
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do that - No problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@nul800sebastiaan
Copy link
Member

Thanks you two! Works well, looks good and it's very helpful to editors! 👍

@nul800sebastiaan nul800sebastiaan merged commit 9b9173d into umbraco:dev-v7 Jul 27, 2018
@BatJan
Copy link
Contributor Author

BatJan commented Jul 27, 2018

I think this is my fastest processed PR ever - You're on 🔥 @nul800sebastiaan :-) 👏

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

Successfully merging this pull request may close these issues.

3 participants