Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where can I find the commit description #866

Closed
hawlcat opened this issue Feb 3, 2021 · 4 comments · Fixed by #1134
Closed

Where can I find the commit description #866

hawlcat opened this issue Feb 3, 2021 · 4 comments · Fixed by #1134
Labels
enhancement Good first issue Good first issue to be tackled by new contributors

Comments

@hawlcat
Copy link

hawlcat commented Feb 3, 2021

Hi there,

For committing, a commit message could be input including a title and description. After committing, I can see the commit title, but cannot find the description. Just wondering it is lost or just hidden somewhere? If hidden, where can I find this description because usually put lots of update information there so it is easy for other people to get the update idea at the first glance.

thanks

@ianhi
Copy link
Collaborator

ianhi commented Feb 3, 2021

Hi @hawlcat, I don't think this is currently possible from the extension UI, but this would a nice improvement.

It looks as though the commit message is making it to the frontend in the ISingleCommitInfo but not in the ISinglePastCommitInfo and the latter is used for rendering the items in the history tab.

export interface ISingleCommitInfo {
commit: string;
author: string;
date: string;
commit_msg: string;
pre_commit: string;
}

export interface ISinglePastCommitInfoState {

@ianhi
Copy link
Collaborator

ianhi commented Feb 3, 2021

Actually maybe I was confused. It seems that commit_msg is only the commit title, not the body of the commit message. Perhaps ISingleCommitInfo will need to be modified to also contain the commit message body. And then a
{this.props.commit.commit_body} should be added here:

<div className={branchWrapperClass}>{this._renderBranches()}</div>
<div className={commitBodyClass}>
{this.props.commit.commit_msg}
{this.state.expanded && (
<SinglePastCommitInfo

Though perhaps it's best to leave ISingleCommitInfo without the commit message to reduce the size of packets being passed between the front and backend. Instead the backend function detailed_log should return all of the details of a commit, including the body of the commit:

async def detailed_log(self, selected_hash, current_path):

Then the frontend calls detailed_log here:

const log = await this.props.model.detailedLog(this.props.commit.commit);

@ianhi ianhi added the Good first issue Good first issue to be tackled by new contributors label Feb 3, 2021
@ianhi
Copy link
Collaborator

ianhi commented Feb 3, 2021

I marked this a Good first issue, because I think that my final proposal shouldn't require any significant changes to data flow. But anyone feel free to clear that if this is harder than I think

@fcollonval
Copy link
Member

Closing as resolved by #1134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Good first issue Good first issue to be tackled by new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants