Issue #132: Refactor loading state handling and error messaging in script and layout#153
Conversation
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary of ChangesHello @shihabhasan0161, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the application's loading state and error messaging. The primary goal is to provide a more robust and user-friendly experience by centralizing error display logic and ensuring that post-loading UI updates only occur after successful data retrieval. These changes enhance the application's resilience to data fetching issues and improve the consistency of feedback to the user. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
Code Review
This pull request effectively refactors the handling of loading states and error messages. The introduction of dedicated .loading-state elements in the HTML, along with the corresponding JavaScript logic to manage them, is a solid improvement for both user experience and code structure. The error handling for failed data fetching is now much clearer. My review includes a couple of suggestions to further improve the robustness of the new implementation by using more specific CSS classes for DOM selection, which will enhance long-term maintainability.
| <div class="results-info loading-state" id="loadingState" style="display: none;"> | ||
| <div class="loading-spinner"></div> | ||
| <div>Loading developers...</div> | ||
| <p>Loading developers...</p> |
There was a problem hiding this comment.
For better robustness and maintainability, consider adding a specific class to the loading message paragraph, like loading-message. This would allow the corresponding JavaScript in script.js to use a more reliable selector (.loading-message) instead of the current p:not(.error-message), which is more fragile if the HTML structure changes.
| <p>Loading developers...</p> | |
| <p class="loading-message">Loading developers...</p> |
| <div class="results-info-desktop loading-state" id="loadingStateDesktop" style="display: none;"> | ||
| <div class="loading-spinner"></div> | ||
| <div>Loading developers...</div> | ||
| <p>Loading developers...</p> |
There was a problem hiding this comment.
Similar to the mobile view's loading state, adding a specific class like loading-message here would improve the robustness of the JavaScript selector in script.js. This makes the code easier to maintain as the HTML structure evolves.
| <p>Loading developers...</p> | |
| <p class="loading-message">Loading developers...</p> |
|
@BaseMax if you tell me to adjust the code with what the gemini mentioned above, I will do it. |
|
This branch has conflicts that must be resolved docs/users.json |
|
@BaseMax could you check this please? |
68de359 to
3ac2c94
Compare
|
Fully done and ready? |
What is the point of having export btns? |


currently it's responsive:

if you need any adjustments, please let me know.