-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat: Dataset Creation Footer Component #21241
feat: Dataset Creation Footer Component #21241
Conversation
3885487
to
e635fa0
Compare
Codecov Report
@@ Coverage Diff @@
## master #21241 +/- ##
==========================================
- Coverage 66.66% 66.64% -0.03%
==========================================
Files 1793 1793
Lines 68499 68852 +353
Branches 7278 7415 +137
==========================================
+ Hits 45666 45886 +220
- Misses 20969 21067 +98
- Partials 1864 1899 +35
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
Show resolved
Hide resolved
b7d4731
to
dc07a5c
Compare
dc07a5c
to
ed55343
Compare
e09362a
to
18d86fc
Compare
/testenv up |
@pkdotson Container image not yet published for this PR. Please try again when build is complete. |
@pkdotson Ephemeral environment creation failed. Please check the Actions logs for details. |
18d86fc
to
c2aea81
Compare
|
||
export default function Footer() { | ||
return <div>Footer</div>; | ||
interface FooterObject { |
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.
Could we rename this to be FooterProps
? So it's more consistent with how we name our prop interfaces in other components.
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.
Sure!
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.
+1
c2aea81
to
7ff2200
Compare
@@ -253,7 +273,14 @@ export default function LeftPanel({ | |||
<div className="options-list" data-test="options-list"> | |||
{!refresh && | |||
tableOptions.map((o, i) => ( |
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.
label this as option
instead of o
, and idx
instead of i
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.
done
describe('Footer', () => { | ||
it('renders a blank state Footer', () => { | ||
render(<Footer />); |
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.
It seems like we were rendering this component before without required props, and now, url and addDangerToast are required. Question, are there any other call to this component from before that was not updated to send the new props?
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 is a good question. This was a test that was created as a placeholder while we were implementing the blank state PR. Now that it is finished we are changing it to be reflective of the actual behavior.
} | ||
|
||
function Footer({ url, datasetObject, addDangerToast }: FooterObject) { |
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 just realize we have two Footer
components:
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
Isn't weird to have two components called<Footer>
with different FooterProps
in the same codebase? Should we consider a rename for one of them?
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 don't think it is that weird. One of these is the footer for the native Filter the other is for AddDataset. I think that the folder structure helps differentiate them. How would you rename them?
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.
Well, it depends, if we are keeping them separately like two individual Footer
s, I'd probably Call them FilterFooter
and DatasetFooter
or similar, so I know which Footer
I'm working with. But yeah, the path is descriptive as you mention, not a blocker, more likely just personal taste, so nvm.
6804515
to
c9a8954
Compare
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.
LGTM!
/testenv up |
@AAfghahi Ephemeral environment spinning up at http://54.184.221.243:8080. Credentials are |
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.
lgtm!
bb2af99
to
c365cb0
Compare
@@ -56,6 +65,14 @@ export const LOG_EVENT_TYPE_USER = new Set([ | |||
LOG_ACTIONS_MOUNT_EXPLORER, | |||
]); | |||
|
|||
export const LOG_EVENT_DATASET_TYPE_DATASET_CREATION = new Set([ |
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.
what is this set used for?
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.
Yeah I was trying to figure that out as well, because you end up just importing them straight into the component either way. It was the pattern used by the other logging actions above so I copied it, but those sets are also not invoked anywhere. Happy to delete.
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 removed the set in this commit
.
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
Show resolved
Hide resolved
c365cb0
to
8e2b2c1
Compare
@jinghua-qa The left panel initially used server side searching, which may have cause this. Server side searching was disabled recently so currently the table search isn't working. I'll be fixing the search so that it uses client side searching in my next PR, I will watch for this behavior while I'm fixing it but the search will not work in this PR. For clarity: The entire table list should still display once a schema is chosen, you just can't search through it until my next fix PR. |
/testenv up |
@lyndsiWilliams Ephemeral environment spinning up at http://35.92.221.221:8080. Credentials are |
@jinghua-qa I addressed all your comments above, could you take a look and make sure everything looks right now? |
Re-test in http://35.92.221.221:8080/, find an issue that the table list did not change with the search keyword: Screen.Recording.2022-09-23.at.12.32.23.AM.mov |
Yes, I mentioned this a couple of comments above. Server side searching was disabled recently so currently the table search isn't working. I'll be fixing the search so that it uses client side searching in my next PR. |
Sorry have missed your previous comment, i think other than that i did not find other issues~ LGTM |
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
This creates the footer component for the new dataset creation flow. Currently it does not set the name of the dataset, so default naming is used. However, this will be added after this: #21189 is merged in.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-09-08.at.3.39.05.PM.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION