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

Redesign Share context menu #171253

Closed
wants to merge 320 commits into from
Closed
Show file tree
Hide file tree
Changes from 147 commits
Commits
Show all changes
320 commits
Select commit Hold shift + click to select a range
5ae049b
update
rshen91 Jan 3, 2024
ae2f7a9
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 3, 2024
ef5f8c8
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 4, 2024
38b34f9
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 4, 2024
b760987
work on clean up
rshen91 Jan 4, 2024
36f3774
work on clean up
rshen91 Jan 4, 2024
141786a
add title for single panels
rshen91 Jan 4, 2024
d8dd2e5
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jan 4, 2024
7686cab
wip
rshen91 Jan 4, 2024
1c29200
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 4, 2024
42e8b80
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 4, 2024
b8a4e4d
wip reporting
rshen91 Jan 5, 2024
9611d77
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 5, 2024
e972042
pass types as an array for getJobParams()
rshen91 Jan 5, 2024
dd5f833
pass close modal prop
rshen91 Jan 5, 2024
6510846
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jan 5, 2024
b59fc30
canvas fix
rshen91 Jan 5, 2024
b5bb598
merge
rshen91 Jan 5, 2024
56a1603
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jan 5, 2024
719da76
fix lens share csv
rshen91 Jan 5, 2024
873bf4c
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 5, 2024
e149f92
clean up
rshen91 Jan 5, 2024
c0bf185
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 9, 2024
b8c452b
wip bad state
rshen91 Jan 9, 2024
65f5bb2
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jan 9, 2024
288b43a
wip lens reporting fixed
rshen91 Jan 9, 2024
ebe0730
reporting progress
rshen91 Jan 9, 2024
fbd9788
Merge remote-tracking branch origin/share-context-menodals into share…
rshen91 Jan 9, 2024
e367989
remove unused files
rshen91 Jan 9, 2024
51c9179
clean up
rshen91 Jan 9, 2024
e962913
imports
rshen91 Jan 9, 2024
811e74b
Merge branch 'main' into share-context-menodals
rshen91 Jan 9, 2024
c626868
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 9, 2024
1e2d6aa
tagging api removal
rshen91 Jan 9, 2024
e02efb6
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 9, 2024
0b753e3
remove from plugin
rshen91 Jan 9, 2024
b219fa9
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 9, 2024
bddb75c
more clean up
rshen91 Jan 9, 2024
b62f1a7
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 9, 2024
cafcf76
clean up i18n
rshen91 Jan 9, 2024
1802d7a
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 10, 2024
3d292c8
remove to hopefully fix circ dep"
rshen91 Jan 10, 2024
512d6f6
fix test
rshen91 Jan 10, 2024
e736e33
fix
rshen91 Jan 10, 2024
f56e122
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 10, 2024
833c334
clean
rshen91 Jan 10, 2024
7c0de86
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 10, 2024
1b19ba4
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 10, 2024
e71e269
add labels
rshen91 Jan 11, 2024
5ad15cf
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 11, 2024
a1e6a23
clean up lens csv
rshen91 Jan 11, 2024
7624acd
wip
rshen91 Jan 11, 2024
729afa1
i18n update
rshen91 Jan 11, 2024
dbf2fd6
i18n update
rshen91 Jan 11, 2024
7b9e2a2
update
rshen91 Jan 11, 2024
3d20c6a
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 12, 2024
94e7b06
translations
rshen91 Jan 12, 2024
27135bf
working translation fixes
rshen91 Jan 12, 2024
094f04f
start fixing FTRs
rshen91 Jan 12, 2024
9b853c4
wip ftrs
rshen91 Jan 12, 2024
a0d3cdc
code review
rshen91 Jan 12, 2024
bc38ce0
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 16, 2024
186d3f1
fix object type to image
rshen91 Jan 16, 2024
78fd492
remove optional internationalization
rshen91 Jan 16, 2024
6a33e67
intl
rshen91 Jan 16, 2024
fc788ef
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 16, 2024
9e38c41
data test subj use short url
rshen91 Jan 16, 2024
f8936d4
fix
rshen91 Jan 16, 2024
884f9fe
update limits
rshen91 Jan 16, 2024
0d5fc22
attempt fix
rshen91 Jan 16, 2024
128ddf6
attempt fix 2
rshen91 Jan 16, 2024
8e969f2
fix
rshen91 Jan 16, 2024
82c9d6f
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 16, 2024
d2c7a46
fix
rshen91 Jan 16, 2024
d210860
condense image reporting tests
rshen91 Jan 16, 2024
945acb5
fix scenarios
rshen91 Jan 16, 2024
3f665c1
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 16, 2024
142c494
passing locally
rshen91 Jan 17, 2024
733c088
fix canvas test
rshen91 Jan 17, 2024
b5c0579
merge
rshen91 Jan 17, 2024
5bade70
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 17, 2024
ae9b97e
wip fix tests
rshen91 Jan 17, 2024
3911688
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 17, 2024
07ebca1
wip canvas share modal
rshen91 Jan 17, 2024
31dda8e
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 17, 2024
97fa36a
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jan 17, 2024
b3e5079
add data test subj
rshen91 Jan 17, 2024
579d3fc
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 17, 2024
ade4a49
fix link
rshen91 Jan 17, 2024
d6bb69e
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 17, 2024
b785213
cleaning tests
rshen91 Jan 17, 2024
10ae1f4
revert test change
rshen91 Jan 18, 2024
4d5b45a
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 18, 2024
c143d02
exports to csv download
rshen91 Jan 18, 2024
202b0ef
fix from exports
rshen91 Jan 18, 2024
2860d5c
test
rshen91 Jan 18, 2024
8c88f1d
canvas types
rshen91 Jan 18, 2024
4f38142
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 18, 2024
68d6202
fix canvas story
rshen91 Jan 18, 2024
0a470ca
code review changes
rshen91 Jan 18, 2024
ede74c7
done button in line with other buttons
rshen91 Jan 18, 2024
6cd1249
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 18, 2024
266ca7f
fix so short url shows for viz
rshen91 Jan 18, 2024
a7e1bc5
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
037aece
explain failing test
rshen91 Jan 22, 2024
199c171
fix
rshen91 Jan 22, 2024
d2759fd
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
fbe93ed
add close data test subj to report modals
rshen91 Jan 22, 2024
515bde2
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
edeee60
missed skip test
rshen91 Jan 22, 2024
c6573cf
refactor the hooks
rshen91 Jan 22, 2024
2cdf69a
limits
rshen91 Jan 22, 2024
2a5d119
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
01c591b
wip
rshen91 Jan 22, 2024
6ef1f0b
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
5983b73
add tooltips back
rshen91 Jan 22, 2024
3577a4e
swap order
rshen91 Jan 22, 2024
3b2784d
closing modal in tests
rshen91 Jan 22, 2024
5190fca
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
e45f937
png data test subj radio button
rshen91 Jan 22, 2024
52374cb
getting closer I think
rshen91 Jan 22, 2024
16ea391
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 22, 2024
69c2199
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 23, 2024
df91e76
fix test
rshen91 Jan 23, 2024
38081ac
close modal
rshen91 Jan 23, 2024
b4d5cc8
merge
rshen91 Jan 23, 2024
86de7eb
unskip test
rshen91 Jan 23, 2024
bec995d
png test
rshen91 Jan 23, 2024
2eb4684
fix canvas test
rshen91 Jan 23, 2024
a388e6b
Merge branch 'main' into share-context-menodals
rshen91 Jan 23, 2024
cc63048
fix embed
rshen91 Jan 23, 2024
1c83fe5
add help text
rshen91 Jan 23, 2024
745bbef
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 23, 2024
ccf6a9e
add close share modal data test subj to lens csv download
rshen91 Jan 23, 2024
742553a
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 23, 2024
bef1f90
wip
rshen91 Jan 23, 2024
e3b5ad6
add missing await
rshen91 Jan 23, 2024
7527a94
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 23, 2024
7b24a63
sharePanel-Permalinks
rshen91 Jan 23, 2024
3edd438
add if
rshen91 Jan 23, 2024
2f9aae3
Merge branch 'main' into share-context-menodals
rshen91 Jan 23, 2024
6167390
wip
rshen91 Jan 23, 2024
9102b11
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 23, 2024
5dd3dc0
what does this break, fixed one test
rshen91 Jan 24, 2024
bf4d93e
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 24, 2024
f479f70
copy post url label
rshen91 Jan 24, 2024
094aff3
clean
rshen91 Jan 24, 2024
eaf400e
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 24, 2024
e3859c9
design and code review changes
rshen91 Jan 24, 2024
d734607
design and code review changes
rshen91 Jan 24, 2024
2ed71aa
fix absolute copy url for image reporting
rshen91 Jan 24, 2024
c5705ad
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 24, 2024
a7c5a7f
fix csv modal button alignment
rshen91 Jan 24, 2024
20023de
unused translations
rshen91 Jan 24, 2024
c13d6e9
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 24, 2024
d8eda1c
disable copy url button if not saved
rshen91 Jan 24, 2024
235117b
fix test
rshen91 Jan 24, 2024
a7f8c07
add tooltip above post url
rshen91 Jan 24, 2024
1314faf
change color to warning
rshen91 Jan 24, 2024
1abcbbd
Merge branch 'main' into share-context-menodals
rshen91 Jan 24, 2024
ce4eccc
canvas test passing locally
rshen91 Jan 25, 2024
a13a04a
add test sub to serverless test
rshen91 Jan 25, 2024
23f4551
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
ab3709a
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 25, 2024
0d1a03b
fix
rshen91 Jan 25, 2024
ba9862b
update snapshots copy embed vs embed
rshen91 Jan 25, 2024
b35c665
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
80315df
fix test
rshen91 Jan 25, 2024
7873578
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
cf2fee4
code review feedback from eyo
rshen91 Jan 25, 2024
a1066e1
add warning state when unnsaved
rshen91 Jan 25, 2024
743e6c7
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
7a1d91b
fix esql csv reports in discover
rshen91 Jan 25, 2024
04a0252
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
bd1367d
lens data-test-subj for csv download is diff
rshen91 Jan 25, 2024
e4f830d
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
27054a5
undo changes in share.ts for dashboard that arent needed
rshen91 Jan 25, 2024
7a674ce
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
8fb0ba3
bulk update tests
rshen91 Jan 25, 2024
d5ad356
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
6b4d717
code review from tim
rshen91 Jan 25, 2024
ac26546
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
a802f77
limits
rshen91 Jan 25, 2024
8edcd8f
bulk update tests
rshen91 Jan 25, 2024
7829998
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
1ec1990
revert vis change
rshen91 Jan 25, 2024
72d4718
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
517106b
more tests
rshen91 Jan 25, 2024
9bdac3c
more tests
rshen91 Jan 25, 2024
0c8cd0c
tests
rshen91 Jan 25, 2024
c95e0bf
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
7efa5b4
fix
rshen91 Jan 25, 2024
2149a7e
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 25, 2024
1f8fc6c
more bulk fixes
rshen91 Jan 26, 2024
271889d
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 26, 2024
bbd8265
make it open the menu
rshen91 Jan 26, 2024
e54316d
fix
rshen91 Jan 26, 2024
626aa76
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 26, 2024
d89dffb
remove page
rshen91 Jan 26, 2024
6a4787b
passing locally for lens group 4
rshen91 Jan 26, 2024
c1e0f73
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 26, 2024
23ee75b
passing locally for lens group 1
rshen91 Jan 26, 2024
ddeaa37
wip fixed some brutal tests
rshen91 Jan 26, 2024
1688e82
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 26, 2024
d712cbb
limits
rshen91 Jan 26, 2024
b189f28
fix
rshen91 Jan 26, 2024
fd427ea
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 26, 2024
6953f9f
wip
rshen91 Jan 29, 2024
0587ee8
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 29, 2024
dff642c
fix radio button test
rshen91 Jan 29, 2024
25c4c6d
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 29, 2024
c9fdf0b
fix radio button test
rshen91 Jan 29, 2024
1c1c596
add checks to close the modal
rshen91 Jan 29, 2024
6eed3cd
call funct in before check
rshen91 Jan 29, 2024
a084826
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 29, 2024
4cebe1c
checking for modal open everywhere
rshen91 Jan 29, 2024
3493ce0
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 29, 2024
572bdf7
fix
rshen91 Jan 29, 2024
296ac52
last one?
rshen91 Jan 29, 2024
dd7b8d6
add to everything
rshen91 Jan 29, 2024
37d9c0b
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 29, 2024
cb26dee
test if this gets it to pass
rshen91 Jan 29, 2024
429812d
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 29, 2024
3a0a52a
fix
rshen91 Jan 30, 2024
0249d16
Merge branch 'main' into share-context-menodals
rshen91 Jan 30, 2024
2c5e919
skip flaky test that passes locally
rshen91 Jan 30, 2024
6a78a14
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 30, 2024
9d8b689
discovery tests not finding the data-test-subj skip
rshen91 Jan 30, 2024
e65cb9c
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 30, 2024
24219cc
add check for length 1
rshen91 Jan 30, 2024
2dc99c9
one test
rshen91 Jan 30, 2024
efa750c
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 30, 2024
0ad7002
add is dirty to show if dashboard needs to save changes
rshen91 Jan 30, 2024
0298c38
skip test that is passing locally
rshen91 Jan 30, 2024
ae26439
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 30, 2024
13273c9
fix test
rshen91 Jan 30, 2024
4565b1f
saved objects not available when unsaved test
rshen91 Jan 30, 2024
ef0ee3b
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 30, 2024
7b904cd
test not showing saved search for saved object
rshen91 Jan 30, 2024
493dda0
Merge branch 'main' into share-context-menodals
rshen91 Jan 30, 2024
6eccbeb
Merge branch 'main' into share-context-menodals
rshen91 Jan 31, 2024
1110cd6
Merge branch 'main' into share-context-menodals
rshen91 Jan 31, 2024
a355f03
Merge branch 'main' into share-context-menodals
rshen91 Jan 31, 2024
6886d3e
fix embed modal issue
rshen91 Jan 31, 2024
3141a6d
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 31, 2024
6b4068e
Merge remote-tracking branch 'origin/share-context-menodals' into sha…
rshen91 Jan 31, 2024
4e6860d
Merge branch 'main' into share-context-menodals
rshen91 Jan 31, 2024
dc7cbc7
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 31, 2024
bb8c3b2
saved object option when unsaved
rshen91 Jan 31, 2024
1be558b
Merge remote-tracking branch 'upstream/main' into share-context-menodals
rshen91 Jan 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pageLoadAssetSize:
presentationUtil: 58834
profiling: 36694
remoteClusters: 51327
reporting: 57003
reporting: 80238
rollup: 97204
runtimeFields: 41752
savedObjects: 108518
Expand Down
4 changes: 4 additions & 0 deletions packages/kbn-reporting/export_types/csv_common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ export const CSV_REPORT_TYPE_DEPRECATED = 'CSV';
export const CSV_JOB_TYPE_DEPRECATED = 'csv';

export { getQueryFromCsvJob, type QueryInspection } from './lib/get_query_from_job';

export type JobAppParamsCSV = (
forShareUrl?: boolean | undefined
Copy link
Member

@tsullivan tsullivan Jan 25, 2024

Choose a reason for hiding this comment

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

Suggested change
forShareUrl?: boolean | undefined
/*
* NOTE: This flag is needed for conditional behavior whether
* the report job is ad-hoc or if the params will be used for
* automation. If the intention is to set up automated
* reporting, the job params will be used to create the POST
* URL, and a relative time range filter must be used. Otherwise
* it is an ad-hoc report, and absolute time range is preferred.
*/
forShareUrl?: boolean | undefined

) => Omit<BaseParams, 'browserTimezone' | 'version'>;
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { convertPanelMapToSavedPanels, DashboardContainerInput } from '../../../

import { pluginServices } from '../../../services/plugin_services';
import { showPublicUrlSwitch, ShowShareModal, ShowShareModalProps } from './show_share_modal';
import { overlayServiceMock } from '@kbn/core-overlays-browser-mocks';

describe('showPublicUrlSwitch', () => {
test('returns false if "dashboard" app is not available', () => {
Expand Down Expand Up @@ -74,6 +75,7 @@ describe('ShowShareModal', () => {
return {
isDirty: true,
anchorElement: document.createElement('div'),
overlays: overlayServiceMock.createStartContract(),
};
};

Expand Down
Heenawter marked this conversation as resolved.
Show resolved Hide resolved
Heenawter marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

@Heenawter Heenawter Jan 24, 2024

Choose a reason for hiding this comment

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

Sorry, one other (hopefully) follow up question 🙇

I saw in the requirements doc you shared that the modal should be aware of unsaved changes but I'm not seeing that... We added this warning specifically for dashboards because snapshot URLs can get out-of-hand when the dashboard has unsaved changes - is it possible that we could keep this behaviour consistent? 🤔

Before After
Jan-24-2024 16-00-36 image

Note that this also happens for embed share:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another good catch thank you!! Changes added in a1066e1. Disabling the button will remove the color, and I have the warning color matching the callout in other modals. Wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

@rshen91 I am not seeing the behaviour in my testing 🙈 Do you know what could be going on?

Screen.Recording.2024-01-26.at.11.59.48.AM.mov

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { omit } from 'lodash';
import { i18n } from '@kbn/i18n';
import { EuiCheckboxGroup } from '@elastic/eui';
import { QueryState } from '@kbn/data-plugin/common';
import type { Capabilities } from '@kbn/core/public';
import type { Capabilities, HttpStart, OverlayStart } from '@kbn/core/public';
import { ViewMode } from '@kbn/embeddable-plugin/public';
import { getStateFromKbnUrl } from '@kbn/kibana-utils-plugin/public';
import { setStateToKbnUrl, unhashUrl } from '@kbn/kibana-utils-plugin/public';
Expand All @@ -33,6 +33,8 @@ export interface ShowShareModalProps {
savedObjectId?: string;
dashboardTitle?: string;
anchorElement: HTMLElement;
overlays: OverlayStart;
http?: HttpStart;
}

export const showPublicUrlSwitch = (anonymousUserCapabilities: Capabilities) => {
Expand All @@ -48,6 +50,8 @@ export function ShowShareModal({
anchorElement,
savedObjectId,
dashboardTitle,
overlays,
http,
Heenawter marked this conversation as resolved.
Show resolved Hide resolved
}: ShowShareModalProps) {
const {
dashboardCapabilities: { createShortUrl: allowShortUrl },
Expand Down Expand Up @@ -197,5 +201,6 @@ export function ShowShareModal({
snapshotShareWarning: Boolean(unsavedDashboardState?.panels)
? shareModalStrings.getSnapshotShareWarning()
: undefined,
overlays,
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Dispatch, SetStateAction, useCallback, useMemo, useState } from 'react'
import { ViewMode } from '@kbn/embeddable-plugin/public';
import { TopNavMenuData } from '@kbn/navigation-plugin/public';

import { HttpStart } from '@kbn/core/public';
import { UI_SETTINGS } from '../../../common';
import { useDashboardAPI } from '../dashboard_app';
import { topNavStrings } from '../_dashboard_app_strings';
Expand Down Expand Up @@ -43,6 +44,8 @@ export const useDashboardMenuItems = ({
dashboardBackup,
settings: { uiSettings },
dashboardCapabilities: { showWriteControls },
overlays,
http,
} = pluginServices.getServices();
const isLabsEnabled = uiSettings.get(UI_SETTINGS.ENABLE_LABS_UI);

Expand Down Expand Up @@ -72,9 +75,11 @@ export const useDashboardMenuItems = ({
anchorElement,
savedObjectId: lastSavedId,
isDirty: Boolean(hasUnsavedChanges),
overlays,
http: http as HttpStart,
});
},
[dashboardTitle, hasUnsavedChanges, lastSavedId]
[dashboardTitle, hasUnsavedChanges, lastSavedId, http, overlays]
);

const maybeRedirect = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const getTopNavLinks = ({
isTextBased
);

const { locator } = services;
const { locator, core } = services;
const appState = state.appState.getState();
const { timefilter } = services.data.query.timefilter;
const timeRange = timefilter.getTime();
Expand Down Expand Up @@ -196,6 +196,8 @@ export const getTopNavLinks = ({
onClose: () => {
anchorElement?.focus();
},
overlays: core.overlays,
http: core.http,
});
},
};
Expand Down
Loading