Skip to content

feat(#4394): add show/hide toggle for Appearance section in graph side panel - #4409

Merged
robfrank merged 2 commits into
mainfrom
feat/4394-hide-node-config-side-panel
May 29, 2026
Merged

robfrank merged 2 commits into
mainfrom
feat/4394-hide-node-config-side-panel

Conversation

@robfrank

Copy link
Copy Markdown
Collaborator

$(cat <<'EOF'

Summary

Fixes #4394. The Appearance (node config) section in the graph record editor side panel is now collapsible.

  • Adds a chevron toggle button next to the "Appearance" section header
  • Collapses or expands all appearance controls (label, size, color, border, etc.) with one click
  • Persists the collapsed/expanded state in localStorage (key: graphAppearanceCollapsed) so it survives panel close/reopen and full page reload
  • Default state is expanded (no behavior change for first-time users)

Changes

Single file changed: studio/src/main/resources/static/js/studio-record-editor.js

  • renderGraphAppearanceSection(): wrapped appearance body in #geAppearanceBody div; added chevron toggle button with class record-editor-appearance-toggle; reads graphAppearanceCollapsed from localStorage to set the initial render state
  • toggleGraphAppearanceSection(): new function that toggles body visibility, swaps the chevron icon direction, and persists state to localStorage

Test plan

  • Run a graph query that returns vertices/edges
  • Click a node - the side panel opens with Appearance section visible (expanded by default)
  • Click the chevron button next to "Appearance" - the section collapses, chevron points down
  • Click again - the section expands, chevron points up
  • Close and reopen the panel (click another node) - collapsed state is restored
  • Reload the page and click a node - collapsed state is preserved across reload

🤖 Generated with Claude Code
EOF
)

…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>
@codacy-production

codacy-production Bot commented May 29, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · -7.41% coverage variation

Metric Results
Coverage variation ✅ -7.41% coverage variation
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +325 to +333
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");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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>
@claude

claude Bot commented May 29, 2026

Copy link
Copy Markdown

Code Review

Overall: 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 does

Adds a chevron toggle button to the Appearance section header in the graph record editor side panel. The collapsed/expanded state is persisted to localStorage (graphAppearanceCollapsed), so the preference survives panel close/reopen and full page reloads. Default is expanded (no regression for existing users).


Code quality

  • String-based HTML generation and inline onclick handlers are consistent with the rest of studio-record-editor.js
  • globalStorageLoad / globalStorageSave are the correct wrappers (defined in studio-utils.js) - no raw localStorage calls
  • escapeHtml is used correctly for the type parameter, consistent with the other buttons in the same function
  • The toggleGraphAppearanceSection logic is correct: saving isVisible ? "true" : "false" maps true = was visible = now collapsing = should be stored as collapsed, which matches how appearanceCollapsed is read back

Suggestions and minor concerns

1. Hardcoded #geAppearanceBody ID

The toggle handler uses $("#geAppearanceBody") which assumes only one such element exists in the DOM. This is safe given the single-panel architecture, but it's fragile if the panel is ever extended to show multiple records simultaneously. A slightly more resilient approach would be to scope the toggle to the closest parent section rather than a global ID lookup - but this is a low-priority concern given the current design.

2. Bootstrap Collapse

The project uses Bootstrap 5. Bootstrap's built-in data-bs-toggle="collapse" + data-bs-target mechanism would give you the chevron animation, accessibility attributes (aria-expanded), and keyboard support for free. The localStorage persistence part still needs JS, but could be wired to Bootstrap's show.bs.collapse / hide.bs.collapse events. That said, the current implementation is simple and correct - this is a suggestion rather than a blocker.

3. $(".record-editor-appearance-toggle i") selector

The toggle handler selects the icon by class. If for any reason the panel HTML contained two .record-editor-appearance-toggle buttons (e.g. a future refactor that renders multiple sections), all chevrons would flip simultaneously. Scoping the selector to $("#geAppearanceBody").prev().find(".record-editor-appearance-toggle i") or similar would be more precise. Again, not a blocker in the current design.

4. Missing aria-expanded attribute

For accessibility, the toggle button should include aria-expanded="true/false" matching the current state, and the controlled element should have aria-controls. This would make the toggle usable with screen readers. Given the project's current accessibility posture in Studio this is a nice-to-have, not required.


Docs file

docs/4394-hide-node-config-side-panel.md follows the existing convention in this repo (see docs/4326-polyglot-js-injection.md, docs/4327-remotevertex-newedge-sql-injection.md, etc.) - no issue here.


Test coverage

This 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.


Summary

The 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.

@claude

claude Bot commented May 29, 2026

Copy link
Copy Markdown

Code Review

Overview

This 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

  • Correct localStorage integration: uses the existing globalStorageLoad/globalStorageSave helpers consistently with the rest of the codebase, and the key name graphAppearanceCollapsed follows the established naming convention.
  • State persistence works properly: the initial collapsed/expanded state is re-read on every call to renderGraphAppearanceSection(), so it correctly survives panel close/reopen without any additional wiring.
  • Follows existing UI patterns: inline onclick handlers, jQuery DOM manipulation, Bootstrap button classes, and chevron icons are all consistent with surrounding code.
  • Documentation entry: docs/4394-hide-node-config-side-panel.md follows the repo's established pattern for per-issue design notes.

Issues and Suggestions

Variable name is inverted / misleading (minor bug risk)

In toggleGraphAppearanceSection:

var collapsed = body.is(":visible");   // this is TRUE when the section is *expanded*

collapsed is named as if it holds the new/target state, but it actually holds whether the body is currently visible. The logic is functionally correct because both the if/else branch and the globalStorageSave call treat it consistently, but the name makes the function hard to read at a glance and is an easy source of off-by-one errors in future edits. Suggested rename:

// 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 slideToggle for a smoother UX (optional)

The current body.hide()/body.show() is instant. Using body.slideUp(150)/body.slideDown(150) would give a subtle animation consistent with what users expect from collapsible UI sections. This is purely a UX polish suggestion - the existing instant approach is not wrong.

#geAppearanceBody selector assumes a single panel

The toggle uses $("#geAppearanceBody") (ID selector) and $(".record-editor-appearance-toggle i") (class selector). Since the record editor panel is a singleton this is safe today, but if the panel were ever rendered multiple times simultaneously (e.g., in a split-pane view), both selectors would break. Not a blocker for this PR - just worth noting for future architecture decisions.


Summary

The implementation is functionally correct, properly integrated with the codebase, and addresses the issue well. The only actionable change before merging is renaming the collapsed variable in toggleGraphAppearanceSection to avoid misleading future maintainers. Everything else is optional polish.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.36%. Comparing base (d7efe02) to head (400ea67).
⚠️ Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@robfrank
robfrank merged commit e2108c6 into main May 29, 2026
26 of 33 checks passed
tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Jun 28, 2026
@lvca
lvca deleted the feat/4394-hide-node-config-side-panel branch July 3, 2026 20:18
robfrank added a commit that referenced this pull request Aug 14, 2026
mergify Bot added a commit that referenced this pull request Aug 16, 2026
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)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=redis.clients:jedis&package-manager=maven&previous-version=7.5.3&new-version=8.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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: hide node config on side panel.

1 participant