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

chore: Moves Modal to the components folder #14130

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Moves Modal to the components folder.

This work is part of SIP-61

@rusackas @junlincc

TEST PLAN

1 - Execute all tests
2 - All tests should pass

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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 14, 2021

Codecov Report

Merging #14130 (fb85130) into master (cab110e) will increase coverage by 0.39%.
The diff coverage is 100.00%.

❗ Current head fb85130 differs from pull request most recent head 35b2e3d. Consider uploading reports for the commit 35b2e3d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14130      +/-   ##
==========================================
+ Coverage   79.47%   79.87%   +0.39%     
==========================================
  Files         944      944              
  Lines       47914    47914              
  Branches     6067     6067              
==========================================
+ Hits        38082    38273     +191     
+ Misses       9702     9517     -185     
+ Partials      130      124       -6     
Flag Coverage Δ
cypress 56.32% <ø> (+2.73%) ⬆️
javascript 70.25% <100.00%> (ø)

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

Impacted Files Coverage Δ
...erset-frontend/src/SqlLab/components/SqlEditor.jsx 56.01% <ø> (ø)
superset-frontend/src/components/Modal/Modal.tsx 100.00% <ø> (ø)
superset-frontend/src/components/Modal/index.ts 100.00% <ø> (ø)
...set-frontend/src/components/ModalTrigger/index.jsx 100.00% <ø> (+4.34%) ⬆️
...src/dashboard/components/PropertiesModal/index.jsx 85.61% <ø> (ø)
...src/explore/components/controls/VizTypeControl.jsx 92.06% <ø> (ø)
...rontend/src/SqlLab/components/SaveDatasetModal.tsx 88.23% <100.00%> (ø)
...erset-frontend/src/SqlLab/components/SaveQuery.tsx 74.41% <100.00%> (ø)
...rset-frontend/src/components/DeleteModal/index.tsx 100.00% <100.00%> (ø)
...rontend/src/components/ErrorMessage/ErrorAlert.tsx 93.87% <100.00%> (ø)
... and 47 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 cab110e...35b2e3d. Read the comment docs.

@junlincc junlincc added the sip:61:folder-org Related to the organization of the folders as of SIP 61 label Apr 15, 2021
@@ -20,7 +20,7 @@ import React, { FunctionComponent, useEffect, useRef, useState } from 'react';
import { styled, t } from '@superset-ui/core';

import Icon from 'src//components/Icon';
import StyledModal from 'src/common/components/Modal';
import StyledModal from 'src/components/Modal';
Copy link
Member

Choose a reason for hiding this comment

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

Not in love with this name (it's inconsistent with the other implementations) which is why I'm not really into default exports, personally. Not a concern for this PR, just whining :)

Copy link
Member Author

@michael-s-molina michael-s-molina Apr 16, 2021

Choose a reason for hiding this comment

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

Don't worry! My next step after organizing the folder will be to create an index file and export all components using named exports 😉. For now, I'll rename it to Modal.

@@ -19,7 +19,7 @@
import { t } from '@superset-ui/core';
import React, { FC } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { StyledModal } from 'src/common/components/Modal';
import { StyledModal } from 'src/components/Modal';
Copy link
Member

Choose a reason for hiding this comment

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

This makes my prior comment even more valid, I think... if there's a named StyledModal export, we should NOT bring in the default export as StyledModal. Anyway...

Copy link
Member Author

Choose a reason for hiding this comment

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

Totally agree. The default export and StyleModal have different implementations.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM, needs rebase

@michael-s-molina michael-s-molina force-pushed the modal-to-components-folder branch from d8f795a to ab51acd Compare April 16, 2021 10:35
@michael-s-molina michael-s-molina force-pushed the modal-to-components-folder branch from ab51acd to 35b2e3d Compare April 16, 2021 10:37
Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTG!

@pkdotson pkdotson merged commit b83ee46 into apache:master Apr 16, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.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 sip:61:folder-org Related to the organization of the folders as of SIP 61 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants