-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Re-add dashboard short links #5398
Re-add dashboard short links #5398
Conversation
* Make the short link available to all users * Include filters in the short link for dashboards
Codecov Report
@@ Coverage Diff @@
## master #5398 +/- ##
=========================================
- Coverage 63.28% 63.18% -0.1%
=========================================
Files 349 351 +2
Lines 22121 22204 +83
Branches 2457 2466 +9
=========================================
+ Hits 13999 14030 +31
- Misses 8108 8159 +51
- Partials 14 15 +1
Continue to review full report at Codecov.
|
🏆 ! |
I'm on PTO and will take a look at this next week when I'm back.
Re the UI We'd like all links in the drop-down to simplify the top level
UI. We've also gotten rid of use of icons as they're often cryptic.
Can you match the aesthetics of the Current drop-down options?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good overall, but I'd request the following tweaks:
- move the link button into the dropdown
- remove the icon and instead use text inside the dropdown "Share dashboard" (or something like this)
- when a user doesn't have permissions to save, "Edit" is disabled but you can still click the dropdown to see the "Share dashboard" link
You may also need to rebase this if @graceguo-supercat 's PR to remove the v1<>v2 switch gets in first. (#5418).
Sorry for the late response on this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks for making the changes! I had a couple nit comments but I think we could also just merge it.
return wrapper; | ||
} | ||
|
||
it('read-only', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit -- I would make each of these (read only, write, write + edit) nested describe
blocks and then have on it()
per assertion because it's easier for debugging. I'm really psyched that you wrote tests for this tho so not a blocker.
|
||
import getDashboardUrl from '../../../../src/dashboard/util/getDashboardUrl'; | ||
|
||
describe('getChartIdsFromLayout', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
ref={this.setModalRef} | ||
isMenuItem={this.props.isMenuItem} | ||
triggerNode={this.props.triggerNode} | ||
beforeOpen={this.getCopyUrl.bind(this)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would bind this in the constructor, otherwise it's a new function per render. not a huge deal since this isn't rendered a lot, but we'll have a lint rule soon to enforce.
thanks @jaylindquist ! |
* Re-add dashboard short links * Make the short link available to all users * Include filters in the short link for dashboards * Remove duplicate key causing linter error * Change URL Short link button into a menu item with Modal * Split out tests, bind URL short link in constructor
This PR re-adds the changes from #4760 to include a short link button for dashboards that was accidentally removed in #4528.
Additionally: