Repository navigation
feat(#4394): add show/hide toggle for Appearance section in graph side panel - #4409
Conversation
…e panel The Appearance (node config) section in the graph record editor is now collapsible. A chevron toggle button next to the section header collapses or expands the appearance controls, and the state is persisted in localStorage (key: graphAppearanceCollapsed) so it survives panel close/reopen and page reload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ -7.41% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (d7efe02) 127856 93917 73.46% Head commit (400ea67) 159572 (+31716) 105394 (+11477) 66.05% (-7.41%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#4409) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request adds a toggle button to collapse or expand the Appearance section in the graph record editor side panel, persisting the collapsed state in localStorage. The feedback points out a readability issue where the variable collapsed is assigned the value of body.is(':visible'), which is counter-intuitive since visibility indicates an expanded state. It is recommended to rename this variable to isVisible to improve code clarity.
| var collapsed = body.is(":visible"); | ||
| if (collapsed) { | ||
| body.hide(); | ||
| btn.removeClass("fa-chevron-up").addClass("fa-chevron-down"); | ||
| } else { | ||
| body.show(); | ||
| btn.removeClass("fa-chevron-down").addClass("fa-chevron-up"); | ||
| } | ||
| globalStorageSave("graphAppearanceCollapsed", collapsed ? "true" : "false"); |
There was a problem hiding this comment.
The variable name collapsed is assigned the value of body.is(':visible'). This is highly counter-intuitive because if the body is visible, it is actually expanded (not collapsed). This makes the conditional logic if (collapsed) hard to read and maintain, as collapsed actually represents the current visibility (expanded state) rather than whether it is currently collapsed.
Renaming this variable to isVisible or isExpanded makes the code much clearer and less prone to future bugs.
| var collapsed = body.is(":visible"); | |
| if (collapsed) { | |
| body.hide(); | |
| btn.removeClass("fa-chevron-up").addClass("fa-chevron-down"); | |
| } else { | |
| body.show(); | |
| btn.removeClass("fa-chevron-down").addClass("fa-chevron-up"); | |
| } | |
| globalStorageSave("graphAppearanceCollapsed", collapsed ? "true" : "false"); | |
| var isVisible = body.is(':visible'); | |
| if (isVisible) { | |
| body.hide(); | |
| btn.removeClass('fa-chevron-up').addClass('fa-chevron-down'); | |
| } else { | |
| body.show(); | |
| btn.removeClass('fa-chevron-down').addClass('fa-chevron-up'); | |
| } | |
| globalStorageSave('graphAppearanceCollapsed', isVisible ? 'true' : 'false'); |
…ceSection
The variable `collapsed` held the result of `body.is(':visible')`, which
is truthy when the body is *expanded*, making the conditional logic
counter-intuitive. Rename to `isVisible` to match its actual meaning.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code ReviewOverall: Clean, focused change that solves the issue well. The implementation is minimal, follows existing patterns in the file, and the localStorage persistence is a nice UX touch. What the PR doesAdds a chevron toggle button to the Appearance section header in the graph record editor side panel. The collapsed/expanded state is persisted to Code quality
Suggestions and minor concerns1. Hardcoded The toggle handler uses 2. Bootstrap Collapse The project uses Bootstrap 5. Bootstrap's built-in 3. The toggle handler selects the icon by class. If for any reason the panel HTML contained two 4. Missing For accessibility, the toggle button should include Docs file
Test coverageThis is a pure frontend change. The manual test plan in the PR description is appropriate - the steps cover the expand/collapse cycle, persistence across panel close/reopen, and persistence across page reload. No automated UI tests exist in this project for Studio, so that's consistent. SummaryThe change is correct, minimal, and consistent with the existing code style. The three concerns above (ID fragility, Bootstrap collapse alternative, aria attributes) are all optional improvements, not blocking issues. Ready to merge with those noted for potential follow-up. |
Code ReviewOverviewThis PR adds a collapsible toggle for the Appearance section in the graph record editor side panel (issue #4394). The change is purely frontend (JavaScript/HTML), has no backend impact, and is scoped to a single JS file plus a documentation entry. What's Good
Issues and SuggestionsVariable name is inverted / misleading (minor bug risk)In var collapsed = body.is(":visible"); // this is TRUE when the section is *expanded*
// Before
var collapsed = body.is(":visible");
if (collapsed) { body.hide(); ... }
globalStorageSave("graphAppearanceCollapsed", collapsed ? "true" : "false");
// After - clearer intent
var isVisible = body.is(":visible");
if (isVisible) { body.hide(); ... }
globalStorageSave("graphAppearanceCollapsed", isVisible ? "true" : "false");Consider
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4409 +/- ##
============================================
- Coverage 64.38% 64.36% -0.02%
+ Complexity 431 420 -11
============================================
Files 1647 1647
Lines 127856 127894 +38
Branches 27410 27426 +16
============================================
Hits 82322 82322
- Misses 33970 34000 +30
- Partials 11564 11572 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… graph side panel (ArcadeData#4409)
Bumps [redis.clients:jedis](https://github.com/redis/jedis) from 7.5.3 to 8.0.0. Release notes *Sourced from [redis.clients:jedis's releases](https://github.com/redis/jedis/releases).* > 8.0.0 > ----- > > **Jedis 8.0.0** completes the client class consolidation started in 7.0.0, modernizes protocol defaults, tightens security defaults, and adds command coverage for Redis 8.8 and the Redis 8.10 preview. > > * **RESP3 auto-negotiation** on by default for all UnifiedJedis-based clients (with graceful RESP2 fallback) > * **Final removal of legacy JedisPooled / JedisSentineled** classes in favor of the RedisClient family introduced in 7.0.0 > * **Removal of deprecated UnifiedJedis public constructors** > * **Internal refactoring** that affects users of low-level extension points (custom CommandExecutor, Transaction subclasses, ClusterPipeline, CommandObjects) — protocol and connection wiring is now explicit at construction time > * **Search modernization** — the low-level cursor APIs are superseded by ftAggregateIterator(), and the manual broadcast API is removed (Redis 8.0+ broadcasts FT.CREATE server-side) > * **TLS hostname verification enforced** by default in DefaultJedisSocketFactory > * **New Redis 8.8 command coverage** — XNACK, JSON.SET FPHA, Array commands, INCREX, COUNT aggregator on ZINTER / ZUNION(STORE) and their \*STORE variants, multi-aggregator TS.RANGE / TS.MRANGE, plus an experimental COLLECT parameter for FT.AGGREGATE > * **Redis 8.10 command coverage** — HIMPORT (Hinted Hash Templates), FT.ALIASLIST, MAXCOUNT / MAXSIZE on XREAD and XREADGROUP, SUNIONCARD / SDIFFCARD, LMOVEM / BLMOVEM, TS.READ, TS.NRANGE / TS.NREVRANGE, TS.QUERYLABELS, and EXCLUDEEMPTY on TS.MRANGE / TS.MREVRANGE > > For step-by-step upgrade instructions, see the v7 → v8 migration guide: <https://redis.github.io/jedis/migration-guides/v7-to-v8/> > > Changes > ======= > > 🔥 Breaking Changes > ------------------ > > * Remove unusable aclLogBinary() methods ([#4580](https://redirect.github.com/redis/jedis/issues/4580)) > * Tighten Connection.initializeFromClientConfig() visibility to package-private ([#4548](https://redirect.github.com/redis/jedis/issues/4548)) > * CommandObjects refactoring : Enforce protocol ([#4515](https://redirect.github.com/redis/jedis/issues/4515), [#4514](https://redirect.github.com/redis/jedis/issues/4514), [#4513](https://redirect.github.com/redis/jedis/issues/4513)) > * Bump org.apache.commons:commons-pool2 from 2.12.1 to 2.13.1 ([#4409](https://redirect.github.com/redis/jedis/issues/4409)) > * Fix Connection Close Exception Handling for commons-pool2 2.13.1 ([#4439](https://redirect.github.com/redis/jedis/issues/4439)) > * Switch to RESP3 as default protocol version ([#4468](https://redirect.github.com/redis/jedis/issues/4468)) > * Drop deprecated classes and constructors ([#4488](https://redirect.github.com/redis/jedis/issues/4488)) > * Align Search APIs and behaviour with Redis 8.0+ ([#4173](https://redirect.github.com/redis/jedis/issues/4173)) > * refactor: decouple Transaction from Jedis ([#4440](https://redirect.github.com/redis/jedis/issues/4440)) > * Introduce request & response policy support ([#4411](https://redirect.github.com/redis/jedis/issues/4411)) > * Remove unused leftovers from JedisSharding ([#4348](https://redirect.github.com/redis/jedis/issues/4348)) > > 🧪 Experimental Features > ----------------------- > > * Add new COLLECT parameter for FT.AGGREGATE ([#4534](https://redirect.github.com/redis/jedis/issues/4534)) > > 🚀 New Features > -------------- > > * [Redis 8.10] Add HIMPORT (Hinted Hash Templates) support ([#4667](https://redirect.github.com/redis/jedis/issues/4667)) > * [Redis 8.10] Add FT.ALIASLIST search command support ([#4619](https://redirect.github.com/redis/jedis/issues/4619)) > * [Redis 8.10] Add MAXCOUNT and MAXSIZE options to XREAD and XREADGROUP ([#4627](https://redirect.github.com/redis/jedis/issues/4627)) > * [Redis 8.10] Add SUNIONCARD and SDIFFCARD commands ([#4638](https://redirect.github.com/redis/jedis/issues/4638)) > * [Redis 8.10] Add LMVOVEM/BLMOVEM commands ([#4635](https://redirect.github.com/redis/jedis/issues/4635)) > * [Redis 8.10] Support TS.NRANGE and TS.NREVRANGE time series commands ([#4650](https://redirect.github.com/redis/jedis/issues/4650)) > * [Redis 8.10] Add TS.QUERYLABELS support to the client ([#4651](https://redirect.github.com/redis/jedis/issues/4651)) > * [Redis 8.10] Regenerate command flags registry from Redis 8.10-rc2 ([#4653](https://redirect.github.com/redis/jedis/issues/4653)) > * [Redis 8.10] Regenerate command flags registry from Redis 8.8 ([#4652](https://redirect.github.com/redis/jedis/issues/4652)) > * [Redis 8.10] Add EXCLUDEEMPTY option to TS.MRANGE / TS.MREVRANGE ([#4641](https://redirect.github.com/redis/jedis/issues/4641)) > * [Redis 8.10] Add support for the TS.READ time series command ([#4642](https://redirect.github.com/redis/jedis/issues/4642)) > * Add VISMEMBER vector set command ([#4599](https://redirect.github.com/redis/jedis/issues/4599)) > * Mark connections broken on protocol I/O failures ([#4549](https://redirect.github.com/redis/jedis/issues/4549)) > * Improve MultiDbTransaction functionality and test coverage ([#4561](https://redirect.github.com/redis/jedis/issues/4561)) ... (truncated) Commits * [`8e393b9`](redis/jedis@8e393b9) Fix FTSearchParams.params(Map) dropping values when parameters are already se... * [`9bcb5c6`](redis/jedis@9bcb5c6) Pin SDR integration tests to redis:8.6.2 on PR runs ([#4676](https://redirect.github.com/redis/jedis/issues/4676)) * [`d2f4d5d`](redis/jedis@d2f4d5d) [Redis 8.10] Add HIMPORT (Hinted Hash Templates) support ([#4667](https://redirect.github.com/redis/jedis/issues/4667)) * [`f2fe13e`](redis/jedis@f2fe13e) Add SECURITY.md with vulnerability reporting policy ([#4673](https://redirect.github.com/redis/jedis/issues/4673)) * [`0dca44c`](redis/jedis@0dca44c) decode ScanParams.match with SafeEncoder, not the JVM default charset ([#4661](https://redirect.github.com/redis/jedis/issues/4661)) * [`43bef11`](redis/jedis@43bef11) chore(deps-dev): bump org.apache.httpcomponents.client5:httpclient5-fluent fr... * [`c8e87aa`](redis/jedis@c8e87aa) Fix sporadic doctest failures: stale keys and FT.AGGREGATE row-order assumpti... * [`aaf15e8`](redis/jedis@aaf15e8) [Redis 8.10] Add integration test for search-on-timeout config ([#4600](https://redirect.github.com/redis/jedis/issues/4600)) * [`87e9df2`](redis/jedis@87e9df2) Bump 8.10 test env to official 8.10.0 release ([#4663](https://redirect.github.com/redis/jedis/issues/4663)) * [`411d14c`](redis/jedis@411d14c) Speed up slow integration tests ([#4659](https://redirect.github.com/redis/jedis/issues/4659)) * Additional commits viewable in [compare view](redis/jedis@v7.5.3...v8.0.0) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
$(cat <<'EOF'
Summary
Fixes #4394. The Appearance (node config) section in the graph record editor side panel is now collapsible.
localStorage(key:graphAppearanceCollapsed) so it survives panel close/reopen and full page reloadChanges
Single file changed:
studio/src/main/resources/static/js/studio-record-editor.jsrenderGraphAppearanceSection(): wrapped appearance body in#geAppearanceBodydiv; added chevron toggle button with classrecord-editor-appearance-toggle; readsgraphAppearanceCollapsedfrom localStorage to set the initial render statetoggleGraphAppearanceSection(): new function that toggles body visibility, swaps the chevron icon direction, and persists state to localStorageTest plan
🤖 Generated with Claude Code
EOF
)