Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

truncate commit message in commit view if necessary #59913

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jasonhawkharris
Copy link
Contributor

Before, we showed the full commit message on the commit view. Now, we give the user the option to see more, or less of the commit message.

Test plan

Manual testing/passing CI/CD

@@ -353,7 +371,6 @@ export const GitCommitNode: React.FunctionComponent<React.PropsWithChildren<GitC
{!extraCompact && <Link to={canonicalURL}>{oidElement}</Link>}
{afterElement}
</div>
{commitMessageBody}
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised to see this line deleted. Doesn't this just make it impossible to actually show the commit message body?

Comment on lines +174 to +181
<Button
variant="link"
size="sm"
display="inline"
onClick={() => setTruncateCommitMessage(!truncateCommitMessage)}
>
{truncateCommitMessage ? 'see more' : 'see less'}
</Button>
Copy link
Member

Choose a reason for hiding this comment

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

We also use the commitMessageBody to render the byline below. I do not think we ever want an expand/collapse button in the byline

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants