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

Enhance frost-detail-tab-actions to display actions labels in popover. #88 #89

Merged

Conversation

goforsatish
Copy link

@goforsatish goforsatish commented May 14, 2018

Overview

  • Enhance frost-detail-tab-actions to display actions labels in popover

Does this PR close an existing issue?

Yes

Summary

Enhance frost-detail-tab-actions to display action label in popover.
Currently, actions labels are displayed below the each action icon that makes action bar look cluttered in case of many actions on action bar as the icon as well as labels take space on action bar for an action. Displaying only actions icons on the action bar will provide more real estate for other icons. The tooltip will display the corresponding actin label on mouseover on each action.

Issue Number(s)

Screenshots or recordings

action-label-popover

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have evaluated if the README.md documentation needs to be updated
  • I have evaluated if the /tests/dummy/ app needs to be modified
  • I have evaluated if DocBlock headers needed to be added or updated
  • I have verified that lint and tests pass locally with my changes
  • If a fork of a dependent package had to be made to address the issue this PR closes:
    • I noted in the fork's README.md the reason the fork was created
    • I have opened an upstream issue detailing what was deficient about the dependency
    • I have opened an upstream PR addressing this deficiency
    • I have opened an issue in this repository to track this PR and schedule the removal of the usage of the fork

Semver

This project uses semver, please check the scope of this PR:

  • #none#
  • #patch#
  • #minor#
  • #major#

Examples:

  • NONE
    • README.md changes
    • test additions
    • changes to files that are not used by a consuming application (.travis.yml, .gitignore, etc)
  • PATCH
    • backwards-compatible bug fix
      • nothing about how to use the code has changed
      • nothing about the outcome of the code has changed (though it likely corrected it)
    • changes to demo app (/tests/dummy/)
  • MINOR
    • adding functionality in a backwards-compatible manner
      • nothing about how used to use the code has changed but using it in a new way will do new things
      • nothing about the outcome of the code has changed without having to first use it in a new way
      • addition of new CSS selectors
      • addition of new ember-hook selectors
  • MAJOR
    • incompatible API change
      • using the code how used to will cease working
      • using the code how used to will have a different outcome
      • any changes to CSS selector names
      • any removal of CSS selectors
      • any changes to ember-hook selectors
      • possibly changes to test helpers (depends on the changes made)
    • any changes to the dependencies entry in the package.json file

CHANGELOG

  • Enhance frost-detail-tab-actions to display actions labels in popover

@goforsatish goforsatish requested a review from a team as a code owner May 14, 2018 17:04
@ccampbel
Copy link

Regarding @notmessenger's earlier question, yes this change to add the popover to the vertical action bar is the intended UX.
As mentioned, since this is meant to be a very constrained space with small icons, there isn't much room for text. Therefore, the idea is to use very simple, common icon metaphors for these actions as well as offering a popover with the full action label that appears on hover.
One thing I noticed from the pictures above in this PR, the precise visuals don't match the visual spec:

  • the color of the popover is incorrect -- it should follow the hover tooltip spec (BG: Grey_2 @ 85% opacity)
  • the popover should be shifted over slightly such that the triangle portion of it overlaps with the edge of the action strip itself. Again, see the visual design in the link above.

image

@goforsatish
Copy link
Author

I have made the changes according to PR comments. Please review .

action-bar

@ccampbel
Copy link

ccampbel commented May 29, 2018

Thanks for making the updates. Looks good. UX approved.

@goforsatish
Copy link
Author

Action bar panel with action icon :
action-bar-1

On Action icon hover :
action-bar-2

@@ -50,14 +50,14 @@ export default Controller.extend({
],

@readOnly
@computed('selectedTab')
@computed('selectedTab')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the extra space?

tabContent (selectedTab) {
const tab = A(this.get('apiTabs')).findBy('label', selectedTab)
return tab ? get(tab, 'value') : selectedTab
},

@readOnly
@computed('selectedTab')
@computed('selectedTab')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the extra space?

@@ -86,7 +86,7 @@ export default Controller.extend({
queryParams: ['selectedTab', 'selectedSubTab'],

@readOnly
@computed('subtabs', 'selectedTab')
@computed('subtabs', 'selectedTab')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the extra space?

@notmessenger
Copy link
Contributor

Need to merge in latest master branch

@notmessenger
Copy link
Contributor

Unrelated to your changes but if you remove the

const Reporter = require('ember-test-utils/reporter')

and

reporter: new Reporter(),

lines from the testem.js file it will resolve your CI build issues.

Copy link
Contributor

@notmessenger notmessenger left a comment

Choose a reason for hiding this comment

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

If I visit http://ciena-frost.github.io/ember-frost-tabs/#/more-detail-tabs?selectedTab=AIS%20profile there are action icons displayed but when standing up your changes from this PR there are none and the console error of Error: Assertion Failed: A component or helper named "frost-popover" could not be found

@goforsatish goforsatish requested a review from a team as a code owner May 30, 2018 17:08
Copy link
Contributor

@notmessenger notmessenger left a comment

Choose a reason for hiding this comment

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

You have a conflict in your package-lock.json file, likely due to not having merged in latest master first.

package.json Outdated
@@ -50,6 +50,7 @@
"ember-code-snippet": "1.7.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-frost-popover": "^11.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be a dependency and not a devDependency since it is required by consumers for this codebase to function correctly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Which then means this needs to be a MAJOR release and not a PATCH

@goforsatish
Copy link
Author

more-tabs

Copy link
Contributor

@notmessenger notmessenger left a comment

Choose a reason for hiding this comment

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

You are missing updates to the package-lock.json file

@notmessenger
Copy link
Contributor

I have posted a screen recording of this new behavior and have posted it to https://youtu.be/JO5ijeNcqak

@ccampbel Is the "becoming larger and smaller again" effect on hover desired? I'm fine with whatever is desired but I think you've only been looking at screenshots and not interactive behavior.

That also seems like a large bottom margin for triggering the popover but that is just my opinion. Do we need to add another icon to the demo to get a better sense?

@notmessenger
Copy link
Contributor

@ccampbel @goforsatish the icon has a border on it as being clicked (browser effect) but remains once have finished clicking. Is this desired?

screen shot 2018-05-30 at 1 12 10 pm

Copy link
Contributor

@notmessenger notmessenger left a comment

Choose a reason for hiding this comment

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

How did you generate the update to the package-lock.json file? The changes within it do not reflect the changes made to the package.json file.

@goforsatish
Copy link
Author

goforsatish commented May 30, 2018

I generated package-lock.json by running npm install and merged it with the latest code from branch .

@notmessenger
Copy link
Contributor

notmessenger commented May 30, 2018

Via ember install -S ember-frost-popover? Because that is how this dependency should have been installed.

@goforsatish
Copy link
Author

No. I just did npm install.

@goforsatish
Copy link
Author

"ember-frost-popover" changes are there in package-lock.json. Is there still anything missing ?

@notmessenger
Copy link
Contributor

Okay, I see it now. Maybe I was just looking at an outdated version.

@goforsatish
Copy link
Author

The the icon border has been removed and it doesn't retain now on click of icon.

@notmessenger
Copy link
Contributor

@goforsatish if you run the command npm set progress=false && rm -rf node_modules && rm -rf bower_components && npm install && bower cache clean && bower install and then attempt to run either ember s or ember test do they run as expected or do you receive an error of

Error: Cannot find module 'insert-module-globals'

@ccampbel
Copy link

ccampbel commented May 31, 2018

Hi @notmessenger - thanks for mentioning these details. I have asked Phil Savignac to take a look at these issues. In the meantime (since he's away till Monday)...

RE: bigger & larger sizing on the icon as hover effect. Generally speaking, the hover effect used across the frost components is not to resize, but to show a light blue background colour. I think we should follow suit with that approach.

RE: large bottom margin for triggering the popover. Yes, it does look rather large. This will mainly become an issue if/when another button is added below it. I expect each button should have a same-sized target area for hover & click actions.

RE: leaving artifact in place around after click. This is not the intent. Making it look "pressed" only makes sense in the case where the overall UI has gone into some kind of "mode" that you need to represent to the user. And they might need to press again to leave that mode. In this case, I believe it will always cause another action to occur (e.g. dialog to open) that leaves no ambiguity for the user as to what they need to do next.

@goforsatish
Copy link
Author

goforsatish commented Jun 1, 2018

@notmessenger
Yes, I got Error: Cannot find module 'insert-module-globals' on ember s after executing the below commands:
npm set progress=false && rm -rf node_modules && rm -rf bower_components && npm install && bower cache clean && bower install

@notmessenger
Copy link
Contributor

@goforsatish Then you need to fix this. The most likely culprit is that your package-lock.json file got messed up.

@goforsatish
Copy link
Author

action-bar

@Philsavignac
Copy link

UX approved

@notmessenger notmessenger merged commit 96eafdc into ciena-frost:master Jun 11, 2018
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.

Enhance frost-detail-tab-actions to display actions labels in popover.
4 participants