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

[WIP] Porting Masthead to Vue.js #9071

Merged
merged 40 commits into from
May 19, 2020
Merged

Conversation

inkuzmin
Copy link
Contributor

@inkuzmin inkuzmin commented Dec 6, 2019

This is a work in progress on porting the masthead to Vue.js.

  • Add the new masthead below the original one
  • Achieve markup parity using https://bootstrap-vue.js.org/docs/components/navbar/ (thanks @guerler for the hint)
  • Add tooltips
  • "Please login or register to use this feature."
  • Add actions (links/routes), skip the scratch-book for a moment
  • Figure out what is the "nav-note" and port it
  • Figure out what the "noscratchbook" property is responsible for
  • Add the scratch-book
  • Highlight an active item correctly
  • Use dot notation for properties accessors
  • Refactor NavItem into a separate component
  • Handle dividers at the dropdown menu
  • Refactor NavItem classes as computed properties
  • Remove the original NavBar
  • Check if any functionality is still missing and if that's the case port it
  • Remove covered code
  • Prettify code, make tests pass

@guerler
Copy link
Contributor

guerler commented Jan 10, 2020

Thank you so much for working on this. I noticed that there is an issue with the navigation, an error is triggered when navigating to the admin panel and then back to the workflow list. I also noticed that the masthead is not rendered for the data libraries view.

@inkuzmin
Copy link
Contributor Author

@guerler, thank you for checking it! I am going to try to fix the issues you've noticed tomorrow.

@guerler
Copy link
Contributor

guerler commented May 12, 2020

I assume you are referring to masthead_tests.js. I am not sure how useful those tests are given that we use Bootstrap Vue now. Maybe we should transfer some basic tests, but I'd be fine if you want to remove the legacy test file and you think thats appropriate. Btw the qunit tests for the workflow_editor.js were very useful. Thank you!

@jmchilton
Copy link
Member

I tried to transfer a bunch of the tests - got everything transferred except some of the scratchbook interaction tests. I think they didn't work because I'm modeling the tab definitions with a POJO in the test instead of a Backbone collection. I think that probably represents the direction we want to go but if you'd like me to redo the test setup with a Backbone collection and get those last few assertions I can do that otherwise, I'll remove the qunit tests.

Hopefully whoever ports scratchbook.js to VueJS covers that remaining functionality with a unit test - also I think we have Selenium coverage for this because we run through the scratchbook tour.

I'll try working on figuring out the Selenium failures and cleaning up the unneeded code (if any) now.

Problem is the interactive tooltips that are off by default in bootstrap but not bootstrap-vue. interactive tooltips are better for accessibility though so best to just work around them for testing?
v-b-popover.manual.bottom="{ id: tab.id, content: popoverNote, html: true }"
@click="open(tab, $event)"
>
<template v-if="tab.icon">
Copy link
Member

Choose a reason for hiding this comment

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

It'd be great if future work could keep in mind and use the new(ish) vue-fontawesome work that was introduced to swap out the old style fontawesome classes and includes.

user:
type: xpath
selector: '//li[@id="user"]'
# bootstrap-vue a tag doesn't work as link target, need to hit span inside
Copy link
Member

Choose a reason for hiding this comment

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

Hopefully this doesn't break many tours.

@dannon dannon merged commit 29fdb27 into galaxyproject:dev May 19, 2020
@dannon dannon added area/UI-UX kind/refactoring cleanup or refactoring of existing code, no functional changes and removed status/WIP triage labels May 19, 2020
@dannon dannon added this to the 20.09 milestone May 19, 2020
@OlegZharkov
Copy link
Contributor

OlegZharkov commented May 19, 2020

It looks like dropdown doesn't close on mouse click (click on outer area of dropdown div).

Update:
But I guess, it's a minor issue.

@dannon
Copy link
Member

dannon commented May 19, 2020

@OlegZharkov What browser? Anything weird in the console? It seems to work for me. (FF-DeveloperEdition)

click

@OlegZharkov
Copy link
Contributor

OlegZharkov commented May 19, 2020

@dannon
Chromium and Google Chrome version 81.0.4044.92. Same on firefox 76.
I will record a video

@OlegZharkov
Copy link
Contributor

OlegZharkov commented May 19, 2020

Peek 2020-05-19 14-53

It looks like it doesn't happen on every path. It doesn't work on /, but works on /login. Do we use different js frameworks there by any chance?

Peek 2020-05-19 14-56

@dannon
Copy link
Member

dannon commented May 19, 2020

@OlegZharkov I think it's that you're clicking inside the welcome iframe on /, and that's the difference. Can you investigate to see if other iframes have the same issue?

(https://stackoverflow.com/questions/11351726/bootstrap-dropdown-doesnt-collapse-when-clicking-over-iframe -- the blur idea looks reasonable to me)

@OlegZharkov
Copy link
Contributor

@dannon
Yes. It doesn't work on other iframes as well. The idea with blur should work. I can work on it. Currently trying...

@dannon
Copy link
Member

dannon commented May 19, 2020

@OlegZharkov Just saw the ping here, too. Feel free to take this over: https://github.com/galaxyproject/galaxy/compare/dev...dannon:fix-iframe-menuhide?expand=1

@jmchilton
Copy link
Member

jmchilton commented May 19, 2020

A big difference is interactive being on by default for the bootstrap-vue but not for bootstrap. So the menu is more persistent now. This is an accessibility thing - https://bootstrap-vue.org/docs/components/tooltip. I don't know if the blur thing is equivalent to just swapping that but something to consider, I didn't know about the option before looking into why the test behavior changed. 387fded

Update: I guess that was tooltips - not menus. Yeah ignore this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UI-UX kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants