-
Notifications
You must be signed in to change notification settings - Fork 0
Add Skeleton
component
#91
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
Open
b-yogesh
wants to merge
21
commits into
main
Choose a base branch
from
yogesh-41-skeleton
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
==========================================
- Coverage 92.70% 92.47% -0.24%
==========================================
Files 86 88 +2
Lines 1495 1554 +59
Branches 224 235 +11
==========================================
+ Hits 1386 1437 +51
- Misses 91 98 +7
- Partials 18 19 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # chartlets.py/CHANGES.md
# Conflicts: # chartlets.js/packages/lib/src/actions/handleHostStoreChange.ts # chartlets.js/packages/lib/src/store.ts # chartlets.js/packages/lib/src/types/state/store.ts
# Conflicts: # chartlets.js/packages/lib/src/plugins/vega/VegaChart.tsx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #41
Skeleton to be added for the following MUI components:
Adding skeleton to other components should now be a straightforward task (if requested by the users) as we now have a global state to track the status of the
loadingState
for each output of every callback that is invoked in a request.Approach:
Chartlets is built in a way that when a callback is requested, the frontend has to wait until the server responds, which leads to the state changes, thereby re-rendering. During this wait-time when the server is processing the request, currently there is no way to know if a request was sent by a specific component and when it is received as the state can change multiple times during the lifecycle of the app. Instead of trying to differentiate which render is for a request and response, the easy solution was creating a new state that keeps track of every component that will be affected by the callback request and sets the loading state for those components based on the status of the request. Now, the components can easily use a hook to get this state as well as subscribe to any changes to it and based on the value, can either show the skeleton or not.
I would be interested in knowing if there are any other approaches that could have been taken here.