-
Notifications
You must be signed in to change notification settings - Fork 660
Enhance frontend dashboard UX and backend SDK with improved error handling and type hints #699
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
base: main
Are you sure you want to change the base?
Conversation
Hi team! |
df_result = service.data_manager.query(sql, source_name) | ||
elapsed_time = time.time() - start_time |
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 should probably be removed since its not used
return ( | ||
<div className="dashboard-loading-container"> | ||
<LoadingState |
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.
Doesn't seem wise to remove loadingstate component
customText={!components ? 'Loading components' : 'Invalid components data'} | ||
/> | ||
<div className="dashboard-empty"> | ||
<p className="dashboard-empty-text"> |
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 the existing loadingstate component is good
if (components.rows.length === 0) { | ||
return ( | ||
<div className="dashboard-empty"> | ||
<p className="dashboard-empty-text">No components to display</p> | ||
<p className="dashboard-empty-text"> | ||
No components to display. Try running a query or verifying your configuration settings. |
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.
Not sure if this messaging is right
logger.info(f"Successfully queried data source: {source_name}") | ||
return df_result | ||
except Exception as e: | ||
logger.error(f"Error querying data source: {e}") | ||
return None |
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.
imo, should error out instead of returning None
name: Pull Request
about: Create a pull request to contribute to the project
title: 'This PR improves the developer and user experience in Preswald apps across both frontend and backend layers.
'
labels: ''
assignees: ''
Related Issue
Also github issue Fix #698
Description of Changes
This pull request introduces UX and SDK improvements that enhance the developer and user experience.
Frontend (
Dashboard.jsx
):components.rows
being undefined or emptyBackend SDK (
interfaces/
):connect()
,query()
, andget_df()
functionsType of Change
Testing
components
state and observed fallback messagingChecklist