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

Show description on card #75

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM golang:alpine
FROM golang:1.15-alpine
WORKDIR /src
RUN apk add --update npm git
RUN go get -u github.com/jteeuwen/go-bindata/...
COPY ./webapp/package.json webapp/package.json
COPY ./webapp/package-lock.json webapp/package-lock.json
RUN cd ./webapp && \
npm install
npm ci
COPY . .
RUN cd ./webapp && \
npm run build
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ class Board extends Component<Props, State> {
providedDraggable.draggableProps.style
)}>

<Card estimate={f.estimate} annotations={f.annotations} nbrOfComments={filterFeatureCommentsOnFeature(this.props.comments, f.id).length} color={f.color} status={f.status} title={f.title} link={this.props.url + "/f/" + f.id} bottomLink={index === ff.length - 1 && !viewOnly ? () => this.setState({ showCreateFeatureModal: true, createFeatureModalMilestoneId: m.id, createFeatureModalSubWorkflowId: sw.id }) : undefined} />
<Card estimate={f.estimate} annotations={f.annotations} nbrOfComments={filterFeatureCommentsOnFeature(this.props.comments, f.id).length} color={f.color} status={f.status} title={f.title} hasDescription={f.description.length > 0} link={this.props.url + "/f/" + f.id} bottomLink={index === ff.length - 1 && !viewOnly ? () => this.setState({ showCreateFeatureModal: true, createFeatureModalMilestoneId: m.id, createFeatureModalSubWorkflowId: sw.id }) : undefined} />
</div>
</div>
)}
Expand Down
9 changes: 9 additions & 0 deletions webapp/src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Props = {
nbrOfComments?: number
annotations: string
estimate?: number
hasDescription?: boolean
};

type State = {};
Expand Down Expand Up @@ -48,6 +49,14 @@ class Card extends Component<Props, State> {
null
}

{this.props.hasDescription ?
<div>
<i style={{ fontSize: "12px" }} title="description" className="material-icons align-middle">notes</i>
</div>
:
null
}

{this.props.nbrOfComments! > 0 ?
<div title={this.props.nbrOfComments + " comments"} className="whitespace-nowrap " >
{this.props.nbrOfComments!}<i style={{ fontSize: "12px" }} className="material-icons align-middle">chat_bubble_outline </i>
Expand Down