Repository navigation
Fix #3781: Resolve JS crashes and prevent legend panel collapse on in… - #6007
Open
aasthag01-26 wants to merge 3 commits into
Open
aasthag01-26 wants to merge 3 commits into
aasthag01-26 wants to merge 3 commits into
Conversation
…nel collapse on interaction
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The remaining feedback is limited to small cleanup/documentation consistency items and does not affect the correctness of the crash fixes or legend interaction behavior.
Pull request overview
This PR addresses UI/JS stability issues in the ajax scheduling module related to the scheduling matrix: it hardens cell rendering/tooltip logic to avoid runtime errors on missing data, and adjusts the legend toggle behavior to prevent unintended collapse during interaction.
Changes:
- Prevent legend interactions from bubbling and causing unintended UI side-effects; update button label based on actual legend visibility.
- Make
Cellrendering and tooltip generation resilient to missing fields (e.g.,flags,emailcode, missing categories) to avoid JS crashes. - Preserve selection highlighting behavior while updating cell styles.
File summaries
| File | Description |
|---|---|
| esp/public/media/scripts/ajaxschedulingmodule/ESP/Scheduler.js | Stops click propagation for legend interactions and bases button text on legend visibility. |
| esp/public/media/scripts/ajaxschedulingmodule/ESP/Cell.js | Adds defensive checks for tooltip/background rendering and adjusts styling logic to reduce crashes and UI glitches. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+69
to
+73
|
|
||
| // this.el.css("background-color", ""); | ||
| // this.el.css("background", ""); | ||
| // this.el.css("color", ""); | ||
|
|
Comment on lines
+343
to
+350
| /** | ||
| * Create data for the tooltip | ||
| */ | ||
| this.tooltip = function(){ | ||
| var currentSection = this.section || this.ghostSection; | ||
|
|
||
| // 1. Guard check: Agar cell khali hai toh empty string return karein | ||
| if (!currentSection) return ""; |
10 tasks
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
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.
…teraction
Description
Related Issue
Closes #3781
Type of Change
Testing
AI Disclosure
Checklist