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

dash/edit-mode-context #21231

Open
wants to merge 39 commits into
base: dash/edit-mode-custom-layout
Choose a base branch
from

Conversation

karolkolodziej
Copy link
Contributor

Added context detection for custom HTML.

@karolkolodziej karolkolodziej self-assigned this May 28, 2024
@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 28, 2024

File size comparison

Sizes for compiled+gzipped (bold) and compiled files.

master candidate difference
dashboards/dashboards.js 43.2 kB
148.8 kB
43.5 kB
149.5 kB
244 B
720 B
dashboards/modules/layout.js 12.3 kB
48.2 kB
12.7 kB
49.6 kB
435 B
1451 B

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 28, 2024

Lighthouse report

dashboards-demo-minimal.json

Reference Proposed Diff
performance – score 1 1 0.00
first-contentful-paint – score 1 1 0.00
first-contentful-paint – milliseconds 218.94 193.36 -25.58
first-meaningful-paint – score 1 1 0.00
first-meaningful-paint – milliseconds 435.78 443.32 7.54
dom-size – score 1 1 0.00
dom-size – elements 344 344 0.00

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 28, 2024

Dashboard visual diffs

Visual differences found in:

  • /home/runner/work/highcharts/highcharts/cypress/snapshots/actual/test/cypress/dashboards/visual/dashboards-demo-minimal-loaded.png

See artifacts in the run summary for screenshots

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 28, 2024

Visual test results - No difference found


Samples changed

Change type Sample
Modified samples/highcharts/website/small-demos-dashboards/demo.js

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 28, 2024

Benchmark report - Dashboards

benchmarks/Dashboards/DataPool-CSV-constructor.bench.ts

Sample size This PR avg (ms) master avg (ms) Diff Percent diff
2500000 0.17 0.16 0.01 4%
See all
Sample size This PR avg (ms) master avg (ms) Diff Percent diff
100 0.17 0.16 0.01 4%
1000 0.16 0.16 0 1%
10000 0.17 0.17 0 3%
100000 0.17 0.17 0 0%
1000000 0.17 0.17 0 -1%
2500000 0.17 0.16 0.01 4%

benchmarks/Dashboards/DataTable-loading-rows.bench.ts

Sample size This PR avg (ms) master avg (ms) Diff Percent diff
2500000 747.53 748.06 -0.54 0%
See all
Sample size This PR avg (ms) master avg (ms) Diff Percent diff
100 0.29 0.29 0 -1%
1000 0.56 0.58 -0.02 -3%
10000 3.81 4.35 -0.54 -12%
100000 21.59 21.21 0.38 2%
1000000 296.17 291.96 4.2 1%
2500000 747.53 748.06 -0.54 0%

benchmarks/Dashboards/DataTable-loading-columns.bench.ts

Sample size This PR avg (ms) master avg (ms) Diff Percent diff
2500000 16.93 16.18 0.75 5%
See all
Sample size This PR avg (ms) master avg (ms) Diff Percent diff
100 0.24 0.24 0 -2%
1000 0.24 0.25 -0.01 -5%
10000 0.28 0.45 -0.17 -38%
100000 2.28 2.31 -0.04 -2%
1000000 9.16 9.06 0.09 1%
2500000 16.93 16.18 0.75 5%

@karolkolodziej karolkolodziej changed the title Dash/edit mode context dash/edit-mode-context May 29, 2024
@karolkolodziej karolkolodziej marked this pull request as ready for review June 12, 2024 13:02
@karolkolodziej karolkolodziej changed the base branch from master to dash/edit-mode-custom-layout June 12, 2024 13:03
Copy link

@stitot stitot left a comment

Choose a reason for hiding this comment

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

Really nice!

One thing: if divs in the layout have a high z-index then menu, icons, sidebar etc. will render behind those elements. Perhaps not possible to solve 100%, but we could limit the problem by setting z-index: 1000000000 on those elements. Could be many reasons for devs to use high z-indexes in their layouts, and they often use them in steps of 10 or 100 to have some leverage.

ts/Dashboards/Actions/Bindings.ts Outdated Show resolved Hide resolved
ts/Dashboards/Actions/Bindings.ts Show resolved Hide resolved
ts/Dashboards/Actions/ContextDetection.ts Outdated Show resolved Hide resolved
ts/Dashboards/Components/ConnectorHandler.ts Outdated Show resolved Hide resolved
ts/Dashboards/EditMode/SidebarPopup.ts Show resolved Hide resolved
ts/Dashboards/EditMode/SidebarPopup.ts Outdated Show resolved Hide resolved
@karolkolodziej karolkolodziej changed the base branch from dash/edit-mode-custom-layout to master June 21, 2024 06:48
Copy link

@stitot stitot left a comment

Choose a reason for hiding this comment

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

I meant it when I said "1000000000" ;-)

For this to actually reduce cases of overlap due to high z-index in customers layout I believe it must be much higher than 100.

@sebastianbochan
Copy link
Contributor

The zIndex like 1000000000 does not make sense, because the maximum value is limited. I suggest setting the value 9999.

@stitot
Copy link

stitot commented Jun 27, 2024

The zIndex like 1000000000 does not make sense, because the maximum value is limited. I suggest setting the value 9999.

@karolkolodziej mentioned there was maybe a more elegant solution than this "brute force" one.

Copy link
Contributor

@sebastianbochan sebastianbochan left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@karolkolodziej karolkolodziej changed the base branch from master to dash/edit-mode-custom-layout June 28, 2024 11:04
@karolkolodziej karolkolodziej changed the base branch from dash/edit-mode-custom-layout to master June 28, 2024 11:05
@karolkolodziej karolkolodziej changed the base branch from master to dash/edit-mode-custom-layout June 28, 2024 11:05
Copy link

@stitot stitot left a comment

Choose a reason for hiding this comment

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

I would like to understand your reluctance to set this higher. Value for z-index is an integer, so can be −2147483648 to +2147483647 without breaking the rules. Could we at least add some 9's, so that the value is 9999999? The higher the better, as it will cover more cases. Your call.

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.

None yet

6 participants