-
Notifications
You must be signed in to change notification settings - Fork 734
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
Schema polling feature #922
Conversation
…, save button saves disabled comments
Fix for additional line-breaks after each item
Schema will now default to true for commentsDisabled and commentDescription properties
* Schema only updates in state if it has changed
Fix for additional line-breaks after each item
Schema will now default to true for commentsDisabled and commentDescription properties
* Schema only updates in state if it has changed
…ound into schema-polling
Hey Rohit, thanks for the PR! I’ve been bit out of loop re: schema polling, so I apologise if I’m missing some important points here. But what’s the reason behind highlighting schema polling state as prominently? To me, it feels more like a “set it and forget it” setting. You probably want it to be on by default, but also have the ability to turn it off for whatever reason. The current placement and icon of the indicator feels more like a non-responsive refresh button. I propose we leave the schema polling just as a setting in configuration, and instead of reloading the schema automatically every 2 seconds, we could show a notice on schema changes along with a refresh link. This would help to avoid situations where someone is browsing the schema and gets refreshed midway through. |
@kuldar, thanks for the input! Are you saying that rather than automatically refreshing the schema, we indicate that there is an update and let them click to update it? |
One thing I would like to note is that we would need to "refresh" the schema to check if the schema has updated. The default behavior for this is that the refresh icon will spin while it is fetching. Perhaps some more details on what behavior you are thinking would help. |
Sorry, I should've been clearer - my suggestion was to leave the polling on by default (are there reasons why not to?) and then when changes are detected, show the notice for manual reload of the schema. |
Thanks! I'll look into adding the manual reload for schema and SDL tabs. I have a couple of questions:
Here is how I am imagining it to be working so far based on your feedback:
For the time being, I will get started working toward the changes I mentioned above, but please feel free to make any corrections 😄 |
Yes, I think we're pretty much on the same page. I originally also suggested to maybe remove the refresh icon/button altogether, but I noticed now that we've always had the refresh button, just on the other side. So I think your proposal in previous comment makes sense - we'd just show the gray refresh icon next to the url and spin it whenever fetching happens. I would probably not make it green though and keep it in the same gray tone as it is currently. |
Hi @kuldar,
|
Yes, I think that's the perfect behaviour. I'm also not against removing the animation. Thank you! 👍 |
Everything looks solid from my point of view. |
Awesome! I'll go ahead and stop the animation and keep the icon static. Let me know if you would like to use a different icon to indicate polling. |
Decided to go with #934 instead of this one. |
Fixes #.
Changes proposed in this pull request:
schema.enablePolling
to toggle the feature.When the feature is enabled, the reload icon turns green and has a subtle glow effect.
The polling interval is every 2000ms.
The schema only updates in the playground's state if there has been a change. The main reason for this is to keep a smooth UI for the docs explorers. Currently, if the schema updates, the search bar in the DOCS tab gets cleared and the content in the SCHEMA tab scrolls to the top.