ls1intum / Hephaestus

Hephaestus - A Generative AI Mentor for Agile Software Development
MIT License
8 stars 1 forks source link

Add pull requests component #92

Closed iam-flo closed 1 month ago

iam-flo commented 2 months ago

Motivation

Adds a pull request widget component and the necessary data to display pull requests of a user

Description

Screenshots (if applicable)

Bildschirmfoto 2024-09-16 um 18 06 58

Checklist

General

Client (if applicable)

Server (if applicable)

FelixTJDietrich commented 2 months ago

We also have colors defined for border and card that you can make use off

iam-flo commented 2 months ago

Rework and ready to merge

FelixTJDietrich commented 2 months ago

It looks like this in the Storybook now: image https://66a8981a27ced8fef3190d41-wvdgwzpzof.chromatic.com/?path=/docs/ui-appissuecard--docs

Some points that I noticed, see screenshot:

FelixTJDietrich commented 2 months ago

This is currently the component API:

<app-issue-card
  [pullRequest]="{title: 'Add feature X', number: 12, deletions: 5, url: 'http://example.com', state: 'CLOSED', repository: {name: 'Artemis', nameWithOwner: 'artemis-education/artemis', defaultBranch: 'master', visibility: 'PUBLIC', url: 'http://example.com'}, createdAt: 'Jan 1', pullRequestLabels: {'_constructor-name_':'Set'}, reviews: {'_constructor-name_':'Set'}}"
></app-issue-card>

Maybe we can not pass a complex type there, does it make sense, maybe not? Think like SwiftUI previews, this is basically what Storybook is for us

iam-flo commented 1 month ago

@GODrums I added a hover effect for the component, so that it is clearly clickable. I. think I implemented all requested changes. If you want to support, you can take a look at making the labels look like from GitHub. Haven't been able to implement that. In the future please use rebase for PRs as this cleans up the git tree. I will squash the commits before merge to clean everything up.

GODrums commented 1 month ago

@iam-flo Sorry, I was out of line committing in your PR without asking. I think I also forgot to git pull before merging since I was doing it from mobile. Our usual convention is that @FelixTJDietrich merges all PRs with squashing, so no need to worry about git trees.

I think there are few smaller QoL things of the feedback left, I'll have a quick look and mark them.

iam-flo commented 1 month ago

@GODrums thank you for the suggestions 😄

FelixTJDietrich commented 1 month ago

LGTM, Thanks :)