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

Component: SimpleCard #4

Closed
3 of 16 tasks
allishultes opened this issue Aug 15, 2019 · 0 comments
Closed
3 of 16 tasks

Component: SimpleCard #4

allishultes opened this issue Aug 15, 2019 · 0 comments
Labels
generic component A non-workspace component for the storybook

Comments

@allishultes
Copy link
Contributor

allishultes commented Aug 15, 2019

Is your feature request related to a problem? Please describe.
N/A. We want to create a card component that allows users to see the name and description of projects/transcripts/paper edits, and to edit or delete them.

Describe the solution you'd like
The card component must include the following:

  • the name of a project / transcript, with a link redirecting to that project/transcript
  • a description
  • an edit button, which allows users to modify the title and description of a project/transcript/paper edit (@pietrop @emettely is this correct or does the edit button edit title/description?)
  • a working delete button, which removes the project/transcript/paper edit.

For this issue to be marked as complete, it must:

  • Have been added to the Storybook
  • Have been published on NPM
  • Have been refactored for use in DPE client

Received props:

  • key
  • id
  • title (string)
  • description (string)
  • handleEdit (function)
  • handleDelete (function)
  • showLinkPath

Link to SimpleCard being called in original repo: https://github.com/bbc/digital-paper-edit-client/blob/5b2d4300cc309912188adbe72201d778c41eceaf/src/Components/lib/List/index.js

63103915-e96fae00-bf75-11e9-80a8-cb659a6b09bf

Describe alternatives you've considered
In the original repo, it was decided that having a card component for projects and paper edits, and a a separate component for transcripts, made the most sense. However, it is up to the person working on this ticket to evaluate whether or not the code could be made cleaner by combining the logic into one component.

Additional context
Code: https://github.com/bbc/digital-paper-edit-client/blob/d6a0688d3e50aceaa0b1f527facdc0fea5840ae2/src/Components/lib/SimpleCard/index.js

Checklist

  • Fork the repository (external contributors)
  • Create a branch with a meaningful name eg component-
  • Add automated tests*
  • Test suite passes (npm run test)
  • Code is linted (npm run lint)
  • Update documentation and QA docs - see updating the documentation*
  • re-factoring for code quality and readability
  • Setup your PR for review (start with a draft PR)
  • Demonstrated (attach link or image)

Additional Notes
See React Transcript Editor storybook on set up and layout.

https://bbc.github.io/react-transcript-editor/?path=/story/demo--default

@allishultes allishultes added the generic component A non-workspace component for the storybook label Aug 19, 2019
@allishultes allishultes changed the title Component: Card Component: SimpleCard Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generic component A non-workspace component for the storybook
Projects
None yet
Development

No branches or pull requests

2 participants