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: Set fixed maxWidth of the cron schedule modal #19485

Merged

Conversation

codemaster08240328
Copy link
Contributor

SUMMARY

When we select year/month cases from cron schedule modal, the modal width is changed dynamically.

We need to set fixed max width of the modal.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

FCC New Coder Survey 2018 - 1 April 2022 - Watch Video




After:

FCC New Coder Survey 2018 - 1 April 2022 - Watch Video



TESTING INSTRUCTIONS

  1. Open a dashboard or a chart
  2. Click the calendar icon

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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 Apr 1, 2022

Codecov Report

Merging #19485 (61637f5) into master (5e468f7) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #19485      +/-   ##
==========================================
- Coverage   66.54%   66.50%   -0.05%     
==========================================
  Files        1692     1714      +22     
  Lines       64775    64974     +199     
  Branches     6661     6717      +56     
==========================================
+ Hits        43103    43209     +106     
- Misses      19972    20058      +86     
- Partials     1700     1707       +7     
Flag Coverage Δ
javascript 51.25% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...set-frontend/src/components/ReportModal/styles.tsx 87.87% <100.00%> (+0.37%) ⬆️
...-chart-controls/src/sections/advancedAnalytics.tsx 14.28% <0.00%> (-19.05%) ⬇️
...end/src/components/Form/LabeledErrorBoundInput.tsx 95.00% <0.00%> (-5.00%) ⬇️
...-ui-chart-controls/src/components/MetricOption.tsx 90.90% <0.00%> (-3.83%) ⬇️
...dashboard/components/SliceHeaderControls/index.tsx 66.25% <0.00%> (-0.42%) ⬇️
.../src/explore/components/DataTableControl/index.tsx 70.66% <0.00%> (-0.39%) ⬇️
...frontend/src/SqlLab/components/SqlEditor/index.jsx 51.07% <0.00%> (-0.28%) ⬇️
superset-frontend/src/views/CRUD/hooks.ts 46.15% <0.00%> (-0.26%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 60.39% <0.00%> (ø)
superset-frontend/src/components/Label/index.tsx 100.00% <0.00%> (ø)
... and 48 more

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 5e468f7...61637f5. Read the comment docs.

@rusackas
Copy link
Member

Checking in on the intended UX here. In the After video, we still see the width of the modal changing... did we want to make it some sensible fixed/min width so that it doesn't push and pull at all based on content changes? @yousoph @eschutho

@yousoph
Copy link
Member

yousoph commented Apr 14, 2022

Checking in on the intended UX here. In the After video, we still see the width of the modal changing... did we want to make it some sensible fixed/min width so that it doesn't push and pull at all based on content changes? @yousoph @eschutho

Yeah - the min width should be set to what we see in the second half of the "After" video so it doesn't jump when switching to month and year selections

@codemaster08240328
Copy link
Contributor Author

@@ -71,6 +71,7 @@ export const StyledScheduleTitle = styled.div`

export const StyledCronPicker = styled(CronPicker)`
margin-bottom: ${({ theme }) => theme.gridUnit * 3}px;
width: 450px;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
width: 450px;
width: ${({ theme }) => theme.gridUnit * 120}px;

Is 480px too much? This seems like a nice round-ish number of gridUnits (divisible by 3 or 4)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

480 px is too much from my memory. Let me check again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

480px seems okay. I will use the above calculation.

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

@codemaster08240328
Copy link
Contributor Author

@rusackas , the test environment above you created, doesn't have report/alert config on. So we can't see this modal unfortunately there.

@rusackas rusackas merged commit 7cfd892 into apache:master Apr 29, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
* fix: Set fixed maxWidth of the cron schedule modal

* resolve comment

* resolve comment
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* fix: Set fixed maxWidth of the cron schedule modal

* resolve comment

* resolve comment
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 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 Preset-Patch size/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants