# git_graph: Selectable commit message in detail panel \(\#59674\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5b805ac0743660a7034c6504b49a9f10f65524c0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5b805ac0743660a7034c6504b49a9f10f65524c0

Requested commit: 5b805ac0743660a7034c6504b49a9f10f65524c0

Commit: 5b805ac0743660a7034c6504b49a9f10f65524c0

Tree: f7e8c98d1b6075cb69abef6ad441c4376eb52185

Author: Danny Clarke

Committer: GitHub

## Message

```
git_graph: Selectable commit message in detail panel (#59674)

# Objective

Fixes #57766 

Allow users to select and copy the text of commit messages from the git
graph details panel.

## Solution

Implements selectable commit message in the detail panel using
`MarkdownElement`s a la `commit_view`.

### Affordances considered and abandoned:

- "copy message" and/or "copy subject" buttons, but the UI here is
already pretty tight and I don't feel confident enough in my design
chops or familiarity with Zed to propose bigger UI changes here.

- Default-collapsed message with expand button, a la `commit_view`. The
use-case of this panel is to get the gist of a commit while moving
somewhat quickly through the graph. One might argue that the subject
line alone is enough for that, but often it isn't and the thought of
having to constantly expand commit messages rather than making the
message immediately visible with scroll felt like it would produce a
repetitious experience.

## Testing

- Adds two unit tests to verify that selection works and is idempotent

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

Video demonstrating the functionality:

https://github.com/user-attachments/assets/b910aaa3-2db2-4da8-904b-21b270677ca9

---

Release Notes:

- Show full commit message as markdown in details panel of the git graph
```

## Parents

- [6e9ff7a4f31ad4baa467058765f5fee00e4c2bc7](https://git.cafe/gitcafe/zed/commit/6e9ff7a4f31ad4baa467058765f5fee00e4c2bc7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5b805ac0743660a7034c6504b49a9f10f65524c0?format=markdown)
