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

fix(dashboard): Open "View Chart in Explore" in the same window #14778

Merged
merged 2 commits into from
Jun 29, 2021
Merged

fix(dashboard): Open "View Chart in Explore" in the same window #14778

merged 2 commits into from
Jun 29, 2021

Conversation

geido
Copy link
Member

@geido geido commented May 24, 2021

SUMMARY

Fixes: #14672

The function postForm introduced in PR #9345 has the target set to _blank by default. This PR specifies _self instead. There does not seem to be any obvious issue in doing so. Input from @graceguo-supercat is appreciated as a double check.

TESTING INSTRUCTIONS

  1. Open a dashboard
  2. Choose a chart and select "View Chart in Explore"
  3. Make sure the chart Explore page is opened in the same window

ADDITIONAL INFORMATION

  • Has associated issue: Keep dashboard's "View chart in Explore" from opening a new tab #14672
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #14778 (169de6d) into master (281d637) will not change coverage.
The diff coverage is 0.00%.

❗ Current head 169de6d differs from pull request most recent head 4dca748. Consider uploading reports for the commit 4dca748 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #14778   +/-   ##
=======================================
  Coverage   77.57%   77.57%           
=======================================
  Files         963      963           
  Lines       49290    49290           
  Branches     6205     6205           
=======================================
  Hits        38235    38235           
  Misses      10854    10854           
  Partials      201      201           
Flag Coverage Δ
javascript 72.43% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...uperset-frontend/src/explore/exploreUtils/index.js 66.25% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 281d637...4dca748. Read the comment docs.

@apache apache deleted a comment from github-actions bot May 25, 2021
@junlincc
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@junlincc Ephemeral environment spinning up at http://34.218.44.244:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@junlincc junlincc requested review from villebro and rusackas May 25, 2021 22:49
@junlincc junlincc added the hold! On hold label May 26, 2021
@junlincc
Copy link
Member

Thanks for the PR. Please see video of Before and After behavior in select of Dashboard->Explore->Dashboard flow

Screen.Recording.2021-05-26.at.10.53.26.AM.mov

Previous behavior. View chart in Explore takes user to Explore, user revise the chart in Explore and can save it back to same dashboard( preselect in the dropdown). i dont think your PR changed the behavior, just wonder why the source dashboard is not preselected anymore.

@geido
Copy link
Member Author

geido commented May 27, 2021

@junlincc I don't see the problem that you are describing but I see a worse problem.

If you open up any dashboard it will always pre-select the same dashboard, independently from the actual dashboard that you have opened. This is not related to this PR as this problem is reproducible on master and in this branch also now that I have merged it with master.

See video.

COVID.Vaccine.Da.2.mp4

Please let me know if you can reproduce it, we should file a separate issue.

@junlincc junlincc added the bash! label May 28, 2021
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM. I looked at the original PR, and I didn't see an explicit mention of meaning to start opening the browser in _blank, so I assume that was a regression. But it would be nice if @graceguo-supercat could confirm this. However, what does seem to be intentional is targeting _blank when pressing "Run in SQL Lab" from "Explore". I wonder if that behavior should also be changed, or if it's the exception that validates the rule?

@amitmiran137 amitmiran137 merged commit faae27b into apache:master Jun 29, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@john-bodley
Copy link
Member

john-bodley commented Jul 1, 2021

Apologies for the late response. @geido @villebro et al. could one provide context as why we want to explore a chart in place as opposed to in a new tab? I think many users prefer opening a chart in a new tab whilst maintaining reference to the dashboard—especially when one wishes to open multiple charts (which isn't possible with this change). Additionally per @villebro's comment the behavior of opening a chart in a new tab is consistent with "Run in SQL Lab" etc.

@graceguo-supercat
Copy link

graceguo-supercat commented Jul 1, 2021

I didn't notice this PR till today....Airbnb users preferred to open "View Chart in Explore", because our dashboard is large, many charts, many tabs. A user may open a dashboard, then click a few tabs and nested sub tabs, and then click View chart. Open the chart in the same window will make user lost their context. Please revert this PR.

I would like to know what's the benefit to open chart in the same window?

@rusackas
Copy link
Member

rusackas commented Jul 1, 2021

@graceguo-supercat @john-bodley @junlincc

The reason for the change was that users were annoyed by the proliferation of new tabs, when they felt they weren't necessary.

Rather than reverting the PR, how about one of two means to support either behavior?

  1. Make it an actual link so that users can Command-click or right-click the link to choose to open it in a new window?
  2. Add a configuration variable in config.py so that the admin of the installation can override it?

If neither of those work, or take too long, I suppose we can revert it and then carry it forward in a new PR if needed.

@john-bodley
Copy link
Member

@rusackas we think option (2) makes the most sense, though given this is a breaking change (in terms of UX) we sense it is best to revert the PR and in a follow up PR and the configuration option.

michellethomas pushed a commit to airbnb/superset-fork that referenced this pull request Jul 1, 2021
@junlincc
Copy link
Member

junlincc commented Jul 1, 2021

hi @john-bodley @michellethomas i saw that you have reverted this change from locally. thanks for the feedback 🙏

We assume that the reason why a user click "View chart in Explore" is to tweak a specific chart, because all of the "view only" functionalities, including 1) view query 2)view chart details by hovering 3) maximize chart 4) filtering chart can all be done straightly from Dashboard.
Under this assumption, "opening Explore from the same window -> making changes in Explore -> saving chart and going back to the same dashboard -> seeing changes appear on original or a new dashboard" seem to be a better/ more simplified workflow than leaving multiple tabs that show different versions of the same dashboard hanging. One quick enhancement to eliminate confusion is to change "View chart in Explore" to "Edit chart in Explore"

I apologize if this assumption doesn't make sense to your users and the inconvenience we introduced by the change.
As more and more users adopt Superset globally, accommodating to all users from different organizations became harder and harder, which means changes are inevitable.
But I'm not sure if this this change is considered as a "breaking change"
according to a passed SIP [SIP-57] Proposal for Semantic Versioning, the definition of UI/UX changes is as follow

  • Changes that removes an existing functionality, such as a chart type or ability to select favorites.
    (Inconsequential visual changes or small functional changes such as removing a tooltip or the removing the ability to color a label aren't considered breaking changes.)
  • Changes that break an existing workflow without providing a clear alternative or require user intervention for the alternative to be applied.

User may take a while to adapt to the optimized new flow, but the original functionality - opening Explore was not removed by this PR. I would suggest to go with proposed solution 2 without reverting from the main repo. 🙏

@graceguo-supercat
Copy link

graceguo-supercat commented Jul 1, 2021

users were annoyed by the proliferation of new tabs,

Isn't this showing how frequently user needs to dig into many charts from a dashboard?

If this is the case,

  • option 1: open chart from same dashboard window, and go back to dashboard, wait it load, and find next chart.
  • option 2: open chart into another window and leave original dashboard open. User can always go back to dashboard without waiting reloading and find the right tab.

To me the option 2 is much easier and intuitive way.

@graceguo-supercat
Copy link

change "View chart in Explore" to "Edit chart in Explore"

really BAD idea. don't do it.

@junlincc
Copy link
Member

junlincc commented Jul 1, 2021

really BAD idea. don't do it.

sure!! 😁
but again, the assumption we had is based on feedback from a good number of new Superset users. I can foresee more "disagreements" on changes are coming in the future, to make everyone happy, i suggest to make Superset more configurable and general, instead of building it around any specific organizations.

@graceguo-supercat
Copy link

Totally agree make Superset more configurable and general

amitmiran137 pushed a commit that referenced this pull request Jul 4, 2021
(cherry picked from commit faae27b)
rusackas added a commit that referenced this pull request Jul 8, 2021
graceguo-supercat pushed a commit to airbnb/superset-fork that referenced this pull request Jul 8, 2021
@john-bodley
Copy link
Member

john-bodley commented Jul 8, 2021

Thanks @rusackas for reverting this. In terms of user feedback, for this week's internal Airbnb release we forgot to locally revert the change (as was done in the previous release) and were pinged almost immediately by a user in Slack with the following:

When clicking View chart in Explore in my Supeset dashboards, it used to open up Explore view in a separate tab, but now it is navigating away from the dashboard in the same tab..

Are others experiencing this same behavior? (might be an issue with my browser settings, although I have not changed anything recently)

Is this expected behavior? I frequently use this button to explore multiple charts and datasets and it’s rather cumbersome to have to navigate back to the dashboard every time. And when you navigate back to the dashboard, it does not return to the tab you were on before

graceguo-supercat pushed a commit that referenced this pull request Jul 8, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels hold! On hold size/XS v1.3 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keep dashboard's "View chart in Explore" from opening a new tab
9 participants