feat: configurable state inspector page size and stable ordering when showing more object properties

Open
#1,143 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
devtools, frontend

Research direction

Start in packages/applet/src/components/state/StateFieldViewer.vue, especially STATE_FIELDS_LIMIT_SIZE and the plain-object property display path. Reproduce the issue with an object of more than 60 properties whose insertion order differs from alphabetical order. Done means the initial count and “Show more” increment are configurable with 30 as the default, and increasing the limit preserves the existing alphabetical row order.

Written by the indexing model from the issue text.

Description

Problem

In the Vue.js Devtools 7.7.7 Chrome extension, expanding an object in the right-hand state pane initially shows 30 properties. Each "Show more" click reveals another 30, but the newly visible properties are mixed alphabetically into the existing rows instead of appearing at the end. This makes it difficult to keep my place while inspecting large objects.

Requested change

Please make the initial property count and "Show more" increment configurable, with options such as 30, 100, and 200. Keeping 30 as the default would preserve current performance behavior.

Please also consider sorting the complete list of object keys before applying the display limit, so increasing the limit appends the next alphabetically ordered batch without shifting previously displayed rows (when the object itself has not changed).

Source reference

In v7.7.7, packages/applet/src/components/state/StateFieldViewer.vue defines STATE_FIELDS_LIMIT_SIZE = 30. For plain objects, it slices Object.keys(value) to the current limit and then sorts the resulting children.

https://github.com/vuejs/devtools/blob/v7.7.7/packages/applet/src/components/state/StateFieldViewer.vue

Example

Inspect a plain object containing more than 60 properties whose insertion order differs from alphabetical order, then expand it and click "Show more". New properties may be inserted above or between previously visible rows.

Alternatives

Repeatedly clicking "Show more" is cumbersome and changes row positions. A configurable larger batch would reduce the number of clicks; sorting before slicing would independently address the changing row positions.

Environment

Vue.js Devtools 7.7.7, Chrome extension.

I searched existing issues and pull requests for "show more", STATE_FIELDS_LIMIT_SIZE, sorting, pagination, and the 30-item limit and did not find a matching request. PR #973 concerns expanding/collapsing nested Pinia structures rather than this pagination behavior.

Dominant language
TypeScript
Stars
2.9k
Forks
292
Avg merge
3d 22h
Merged PRs (30d)
29

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vuejs/devtools

All issues in vuejs/devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.