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

content-deletion - changes to UI based on mockups #468

Merged
merged 15 commits into from Aug 16, 2012

Conversation

bbuckingham
Copy link
Member

This pull request includes several changes to the Changesets UI to account for the wireframes at:
https://fedorahosted.org/katello/wiki/ContentDeletionDesign

Highlevel summary of changes include:

  • Content tree
    • change from using 'Remove' to 'Added (Undo)' for items added to a changeset. Note: the changeset tree remains unchanged.
    • add tipsy to the 'Added' text so that it provides details like 'Added to changeset ABC'
  • Changset tree
    • provide 2 separate categories for changesets (Promotion / Deletion). We will have 2 sets of breadcrumbs (promotion/deletion), but only 1 tree to support navigating/manipulating them. In other words, user will select promotion/deletion and then work in that context.
    • add tipsy to the Action buttons and update based on state of the action
  • update the page-level helptip to include both Deletion and Promotion
  • many random changes to support the above...
  • few bug fixes found along the way, such as:
    • user edits name/description on CS1, then goes to CS2 to do the same... second updates changed CS1
    • unable to remove a repo from a changeset
    • ...etc

This is an initial commit to add a banner to the changeset sliding
tree to allow a user to view either promotion or deletion changesets...
…n/promotion)

This is an initial commit to provide changes to support the appearance
of 2 separate sliding trees for promotion and deletion changesets.

There is more work to be done to get this to work when applying the
changesets...etc.
If the user accesses the changesets page with a changeset hash
(e.g. "#changeset=changeset_10") and that changeset is a
deletion changeset, load the page with the deletion changeset
sliding tree selected; otherwise, use the default behavior which
is to load the page with the promotion changeset sliding tree
selected.
…sting

Previously we had a single list consisting of all changesets.  In
that listing, we included some text to indicate the type for each
changeset (i.e. deletion/promotion).  Since we are now creating 2
separate lists, that type is no longer necessary; therefore, removing it.
…Remove'

This commit contains changes so that when an item (e.g. product, pkg,
errata...) is added to the changeset, the content tree includes
"Added (Undo)" (where undo is a link) vs "Remove".  Although this
affects the content tree (left side), it does not affect the changeset
tree (right side), which will continue to use 'Remove'.

This commit also contains a small fix to allow repos to be removed
from a changeset after they have been added.  Previously there was
a bug where the repo once added was not correctly detected by
the changeset 'has_item' method.
…Remove'

This is a follow-up to the previous commit to address the changes needed
to the system templates view.
This commit adds the title attribute to the items in the
changeset action bar (e.g. Remove, Edit Details, Review, Promote/Edit).
For simplicity/efficiency, chose to use html title attribute for
these vs creating a tipsy element.
Update to have a custom confirm on changeset deletion, so user
is aware of the type of changeset they are deleting.
Added a tipsy to the 'Added' text in the content tree so that
when user hovers, they see info like "Added to changeset XYZ".
Added title attribute to changeset actions (e.g. Remove, Edit..etc);
however, noticed that tipsy is used in this page quite a bit but
title is not.  As a result, updated them to use tipsy for consistency.
Also, added a 'tipsify' class so that we can have a single instantiation
of tipsy for the tipsies added for the actions, the ones used for
the "Added (Undo)" and others in the future.
'you have created a change set, click the "Promote" button to commit it to the next environment.')) |
= help_tip(_('Changesets allow you to either promote content to or delete content from ' + |
'an environment.<BR/><BR/> ' + |
'For a promotion, you may promote content from one environment to the ' + |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is adding a <BR/><BR/> a good idea in 18n text ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is probably not the best; however, we've had to do it in certain places for helptips to have them render better.

@parthaa
Copy link
Contributor

parthaa commented Aug 15, 2012

Sounds good otherwise .

@mccun934
Copy link
Member

ACK from me, merge away

parthaa added a commit that referenced this pull request Aug 16, 2012
content-deletion - changes to UI based on mockups
@parthaa parthaa merged commit fe7eadd into Katello:content-deletion Aug 16, 2012
$.each(current_changeset.getProducts(), function(index, product) {
$.each(buttons, function(button_index, button){
if( $(button).attr('id') === ('add_remove_product_' + product.id) ){
if( product.all === true){
$(button).html(i18n.remove).removeClass('add_product').addClass("remove_product").removeClass("disabled");
$(button).html(i18n.undo).removeClass('add_product').addClass("remove_product").removeClass("disabled");
$(button).prev('.added').removeClass('hidden').attr('original-title', i18n.added_to_changeset(current_changeset.getName()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure you want to change the HTML (.html()) or the TEXT (.text()) or perhaps attr('value')?

Copy link
Member Author

Choose a reason for hiding this comment

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

On the line that is commented (which uses attr()), we do want to modify the 'original-title' attribute. This is the default attribute used by tipsy.

If the comment is to apply to the previous line (which uses html()) ,that is actually the existing code; however, we wanted to change the text that was rendered. In this case, I believe we can actually use html or text to achieve the same result; however, text may be more appropriate. Will check and include in a separate pull request if needed (since this one got merged just before the comment)

Thanks for the feedback!

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