Skip to content

editor: Extract header and mouse out of element.rs - #57472

Merged
SomeoneToIgnore merged 11 commits into
zed-industries:mainfrom
GoldStrikeArch:feat/refactor-element
May 29, 2026
Merged

editor: Extract header and mouse out of element.rs#57472
SomeoneToIgnore merged 11 commits into
zed-industries:mainfrom
GoldStrikeArch:feat/refactor-element

Conversation

@GoldStrikeArch

Copy link
Copy Markdown
Contributor

cc @SomeoneToIgnore

Summary

Follow-up to this comment. This extracts the buffer header and breadcrumb rendering helpers out of element.rs into a header.rs and mouse related things to mouse.rs

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 22, 2026
@GoldStrikeArch GoldStrikeArch changed the title editor: Extract header and mouse.rs out of editor.rs editor: Extract header and mouse out of element.rs May 22, 2026

@MrSubidubi MrSubidubi 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.

I personally think it does not make much sense if any to not have this in a subfolder for the element rendering - this is completely different from the other stuff and does not take Editor as self but EditorElement - that is an entirely different struct. I'd find it confusing to jump through these and remember that, as this is an entirely different story IMO

@MrSubidubi MrSubidubi added the area:editor Feedback for code editing, formatting, editor iterations, etc label May 22, 2026
@GoldStrikeArch

Copy link
Copy Markdown
Contributor Author

@MrSubidubi

I'd find it confusing to jump through these and remember that, as this is an entirely different story IMO

Would you prefer to have this structure instead:

crates/editor/src/
├─ element/
│  ├─ mouse.rs
│  ├─ header.rs
├─ element.rs

wdyt?

@MrSubidubi

Copy link
Copy Markdown
Member

I think that would be better, yes. Naming is up for debate, but personally feel this would make much more sense

@GoldStrikeArch

Copy link
Copy Markdown
Contributor Author

@MrSubidubi

I think that would be better, yes. Naming is up for debate, but personally feel this would make much more sense

Alright, so I changed the file structure to that, please take a look

@GoldStrikeArch
GoldStrikeArch requested a review from MrSubidubi May 22, 2026 18:48

@SomeoneToIgnore SomeoneToIgnore 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.

Today is my last day, but chimed in and left a few notes.

Comment thread crates/editor/src/element/mouse.rs
Comment thread crates/editor/src/element.rs Outdated
Comment thread crates/editor/src/element.rs Outdated
@GoldStrikeArch
GoldStrikeArch force-pushed the feat/refactor-element branch from 1febae8 to d4c1786 Compare May 29, 2026 10:22

@SomeoneToIgnore SomeoneToIgnore 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.

Thank you for the persistence.

@SomeoneToIgnore
SomeoneToIgnore dismissed MrSubidubi’s stale review May 29, 2026 11:47

Module system is straightened out now

@SomeoneToIgnore
SomeoneToIgnore enabled auto-merge May 29, 2026 11:47
@SomeoneToIgnore
SomeoneToIgnore added this pull request to the merge queue May 29, 2026
Merged via the queue into zed-industries:main with commit 85f8bf7 May 29, 2026
33 checks passed
@GoldStrikeArch
GoldStrikeArch deleted the feat/refactor-element branch May 29, 2026 12:25
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
…ies#57472)

cc @SomeoneToIgnore

## Summary

Follow-up to [this
comment](zed-industries#55352 (reply in thread)).
This extracts the buffer header and breadcrumb rendering helpers out of
`element.rs` into a `header.rs` and mouse related things to `mouse.rs`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…ies#57472)

cc @SomeoneToIgnore

## Summary

Follow-up to [this
comment](zed-industries#55352 (reply in thread)).
This extracts the buffer header and breadcrumb rendering helpers out of
`element.rs` into a `header.rs` and mouse related things to `mouse.rs`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ies#57472)

cc @SomeoneToIgnore

## Summary

Follow-up to [this
comment](zed-industries#55352 (reply in thread)).
This extracts the buffer header and breadcrumb rendering helpers out of
`element.rs` into a `header.rs` and mouse related things to `mouse.rs`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editor Feedback for code editing, formatting, editor iterations, etc cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants