-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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: Empty state refactor #31860
chore: Empty state refactor #31860
Conversation
@@ -113,7 +113,7 @@ const SqlEditorLeftBar = ({ | |||
'schema', | |||
]); | |||
|
|||
const [emptyResultsWithSearch, setEmptyResultsWithSearch] = useState(false); | |||
const [_emptyResultsWithSearch, setEmptyResultsWithSearch] = useState(false); |
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.
Do we actually need this?
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 think we need setEmptyResultsWithSearch
, and are flushing position 1 of the array. Code is a bit cryptic to me here. Not sure why we need setEmptyResultsWithSearch
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.
Since it's meant to be flushed, I could put it in a _
to make it more clear (and keep the spread operator) or hard reference useState(false)[1]
, WDYT?
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 am not sure that we need this. It looks that originally the PR that introduced this was just meant to show some alternate text. I did some testing and I could not see anything breaking with just removing this entirely.
- making `size` a prop instead of one-component-per-size - fixing up the svg so its themable using `currentColor` - centralizing/fixing up references
0b2a217
to
5640c74
Compare
/testenv up |
@mistercrunch Processing your ephemeral environment request here. |
@mistercrunch Ephemeral environment spinning up at http://54.186.90.161:8080. Credentials are |
/korbit-review |
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Fix Detected |
---|---|---|
Hardcoded Empty State Search Parameter ▹ view |
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/SqlLab/components/SouthPane/Results.tsx | ✅ |
superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx | ✅ |
superset-frontend/src/SqlLab/components/QueryHistory/index.tsx | ✅ |
superset-frontend/src/components/EmptyState/EmptyState.stories.tsx | ✅ |
superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx | ✅ |
superset-frontend/src/features/allEntities/AllEntitiesTable.tsx | ✅ |
superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx | ✅ |
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx | ✅ |
superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx | ✅ |
superset-frontend/src/features/datasets/AddDataset/EditDataset/UsageTab/index.tsx | ✅ |
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx | ✅ |
superset-frontend/src/features/home/EmptyState.tsx | ✅ |
superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx | ✅ |
superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx | ✅ |
superset-frontend/src/components/Chart/Chart.tsx | ✅ |
superset-frontend/src/dashboard/components/gridComponents/Tab.jsx | ✅ |
superset-frontend/src/dashboard/components/DashboardGrid.jsx | ✅ |
superset-frontend/src/components/Chart/ChartRenderer.jsx | ✅ |
superset-frontend/src/components/Table/index.tsx | ✅ |
superset-frontend/src/components/EmptyState/index.tsx | ✅ |
superset-frontend/src/components/ListView/ListView.tsx | ✅ |
superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx | ✅ |
superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx | ✅ |
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx | ✅ |
superset-frontend/src/SqlLab/components/SqlEditor/index.tsx | ✅ |
superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Need a new review? Comment
/korbit-review
on this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-review
command in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-description
command in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolve
command in any comment on your PR.- Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Current Korbit Configuration
General Settings
Setting Value Review Schedule Automatic excluding drafts Max Issue Count 10 Automatic PR Descriptions ❌ Issue Categories
Category Enabled Naming ✅ Database Operations ✅ Documentation ✅ Logging ✅ Error Handling ✅ Systems and Environment ✅ Objects and Data Structures ✅ Readability and Maintainability ✅ Asynchronous Processing ✅ Design Patterns ✅ Third-Party Libraries ✅ Performance ✅ Security ✅ Functionality ✅ Feedback and Support
Note
Korbit Pro is free for open source projects 🎉
Looking to add Korbit to your team? Get started with a free 2 week trial here
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.
Looks great. Thanks for doing this. Just a few nits above but approving otherwise.
"version": "7.24.8", | ||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", | ||
"integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", | ||
"version": "7.25.9", |
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.
Just double-checking. Are these bumps necessary here?
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 think I bumped babel-types (and maybe other libs (?)) to try and prevent some warning/console messages. I think they're not directly related to the PR but net-positive, will leave them in as they might be related to things I changed here.
@@ -113,7 +113,7 @@ const SqlEditorLeftBar = ({ | |||
'schema', | |||
]); | |||
|
|||
const [emptyResultsWithSearch, setEmptyResultsWithSearch] = useState(false); | |||
const [_emptyResultsWithSearch, setEmptyResultsWithSearch] = useState(false); |
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 am not sure that we need this. It looks that originally the PR that introduced this was just meant to show some alternate text. I did some testing and I could not see anything breaking with just removing this entirely.
size
a prop instead of one-component-per-sizecurrentColor