fix: dont show wrong msg while loading#13597
fix: dont show wrong msg while loading#13597ganganimaulik wants to merge 1 commit intoappsmithorg:releasefrom
Conversation
|
@ganganimaulik is attempting to deploy a commit to the Appsmith Team on Vercel. A member of the Team first needs to authorize it. |
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
|
This PR has been closed because of inactivity. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
/ok-to-test |
|
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3494819335. |
hetunandu
left a comment
There was a problem hiding this comment.
This is not the correct approach. While it does help when the api is still loading but does not handle the error properly
WalkthroughThe recent changes enhance the loading state management in the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx (1)
22-22: Consider adding a "Loading..." message.The updated condition correctly handles the loading state. However, consider adding a "Loading..." message to enhance user experience.
+ if (isFetchingDatasourceStructure) { + view = <EntityPlaceholder step={props.step + 1}>Loading...</EntityPlaceholder>; + } else { if (props.datasourceStructure?.tables?.length) { view = ( <> {props.datasourceStructure.tables.map( (structure: DatasourceTable) => { return ( <DatasourceStructure datasourceId={props.datasourceId} dbStructure={structure} key={`${props.datasourceId}${structure.name}`} step={props.step + 1} /> ); }, )} </> ); } else { view = ( <EntityPlaceholder step={props.step + 1}> {props.datasourceStructure && props.datasourceStructure.error && props.datasourceStructure.error.message ? props.datasourceStructure.error.message : "No information available"} </EntityPlaceholder> ); } }
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx (2 hunks)
Additional comments not posted (2)
app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx (2)
6-7: LGTM! New imports are necessary and correctly used.The new imports
useSelectorandgetIsFetchingDatasourceStructureare necessary for the updated loading state management.
19-21: LGTM! Correct use ofuseSelectorandgetIsFetchingDatasourceStructure.The
useSelectorhook is correctly used to retrieve the loading state from the Redux store using thegetIsFetchingDatasourceStructureselector.
Description
Fixes #13584
Type of change
How Has This Been Tested?
no schemamsg is not displayed when expanding datasource.Checklist:
Summary by CodeRabbit