Skip to content

devtools: Implement initial support for ArrayPreviewer - #43456

Merged
eerii merged 1 commit into
servo:mainfrom
atbrakhi:array_preview
Mar 20, 2026
Merged

eerii merged 1 commit into
servo:mainfrom
atbrakhi:array_preview

Conversation

@atbrakhi

Copy link
Copy Markdown
Member

Previously arrays were falling back to Object previewer which was showing indices as properties- which was not correct. This PR implements dedicated ArrayPreviewer that follows Firefox's ArrayLike pattern. Currently array preview support only length display, it does not implement showing array items yet.

Now(Correct and follows Firefox pattern, Array items coming in a follow-up PR):
image

Before(We shouldn't see these values- it's incorrect):
image

Testing: Current tests are passing.
Fixes: Part of #36027

@atbrakhi
atbrakhi requested a review from gterzian as a code owner March 19, 2026 13:46
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 19, 2026
@atbrakhi
atbrakhi requested review from eerii and removed request for gterzian March 19, 2026 13:47

@eerii eerii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Mar 20, 2026
@eerii
eerii added this pull request to the merge queue Mar 20, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 20, 2026
Merged via the queue into servo:main with commit 2d39003 Mar 20, 2026
33 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 20, 2026
Gae24 pushed a commit to Gae24/servo that referenced this pull request Mar 26, 2026
Previously arrays were falling back to Object previewer which was
showing indices as properties- which was not correct. This PR implements
dedicated `ArrayPreviewer` that follows Firefox's `ArrayLike` pattern.
Currently array preview support only length display, it does not
implement showing array items yet.

Now(Correct and follows Firefox pattern, Array items coming in a
follow-up PR):
<img width="510" height="167" alt="image"
src="https://github.com/user-attachments/assets/a51f04d4-333c-4d7c-8159-18121c967670"
/>


Before(We shouldn't see these values- it's incorrect):
<img width="1294" height="721" alt="image"
src="https://github.com/user-attachments/assets/2218a622-c791-4436-958e-1a5553de7864"
/>




Testing: Current tests are passing.
Fixes: Part of servo#36027

Signed-off-by: atbrakhi <[email protected]>
@eerii eerii mentioned this pull request Apr 16, 2026
24 of 37 tasks
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.

3 participants