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

feat: import exported boards #4392

Merged
merged 48 commits into from
Nov 11, 2024
Merged

feat: import exported boards #4392

merged 48 commits into from
Nov 11, 2024

Conversation

mateo-ivc
Copy link
Collaborator

@mateo-ivc mateo-ivc commented Aug 5, 2024

Description

Since we have an export feature it would make sense to be able to import those boards again.
Therefore, when creating a new board, there is now an option to import a JSON file that reflects a board.

Changelog

Backend

api/router.go

  • Added import route

api/boards.go

  • Implementation of import board route
  • Parses the json string into the components that will be inserted into the database

dto/...

  • Added structs to parse the JSON data into usable structs.

database/notes.go

  • Added a query to import notes

services/notes.go

  • Added import method for notes -> calls importNote in the DB layer.

Frontend

api/boards.ts

  • Implementation of importBoard route -> sends json string

Note/NoteAuthorList

  • Added authorID of note to be able to create a avatar prop based on the authorID

PassphraseModal

  • Popup that asks for a password when importing a previously password-protected board.

constants/name.ts

  • Since imported Notes with the same author should have the same avatar and name, i implemented a function that returns a random name with seed

NewBoard

  • Added a new button to import a board by drag and drop or by selecting a file.
  • Asks for password if board was prior password protected

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • The light- and dark-theme are both supported and tested
  • The design was implemented and is responsive for all devices and screen sizes
  • The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

(Optional) Visual Changes

@mateo-ivc mateo-ivc self-assigned this Aug 5, 2024
@mateo-ivc mateo-ivc marked this pull request as ready for review August 14, 2024 07:28
@mateo-ivc mateo-ivc changed the title Mi/import board feat: import exported boards Aug 14, 2024
@Schwehn42
Copy link
Collaborator

@mateo-ivc is this ready?

@Schwehn42 Schwehn42 added the Changes Requested Changes requested by the reviewer label Oct 16, 2024
@mateo-ivc mateo-ivc added Review Needed This pull request is ready for review and removed Changes Requested Changes requested by the reviewer labels Oct 21, 2024
src/routes/NewBoard/NewBoard.scss Show resolved Hide resolved
src/routes/NewBoard/NewBoard.tsx Outdated Show resolved Hide resolved
src/routes/NewBoard/NewBoard.tsx Outdated Show resolved Hide resolved
src/routes/NewBoard/NewBoard.tsx Outdated Show resolved Hide resolved
@Schwehn42 Schwehn42 added Changes Requested Changes requested by the reviewer and removed Review Needed This pull request is ready for review labels Oct 24, 2024
@Schwehn42
Copy link
Collaborator

Schwehn42 commented Nov 7, 2024

Hi @mateo-ivc please change the label to "Review needed" if you think this is ready :)

@mateo-ivc mateo-ivc added Review Needed This pull request is ready for review and removed Changes Requested Changes requested by the reviewer labels Nov 8, 2024
@Schwehn42 Schwehn42 removed the Review Needed This pull request is ready for review label Nov 8, 2024
Copy link
Collaborator

@Schwehn42 Schwehn42 left a comment

Choose a reason for hiding this comment

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

LGTM, you just need to change variables using the AccessPolicy type which was changed with #4601 ✌️

@mateo-ivc mateo-ivc added this pull request to the merge queue Nov 11, 2024
Copy link

The deployment to the dev cluster was successful. You can find the deployment here: https://4392.development.scrumlr.fra.ics.inovex.io
This deployment is only for testing purposes and will be deleted after 1 week.
To redeploy rerun the workflow.
DO NOT STORE IMPORTANT DATA ON THIS DEPLOYMENT

Deployed Images
  • ghcr.io/inovex/scrumlr.io/scrumlr-frontend:sha-fcfb1f6

  • ghcr.io/inovex/scrumlr.io/scrumlr-server:sha-fcfb1f6

Merged via the queue into main with commit b35e3b3 Nov 11, 2024
11 of 12 checks passed
@mateo-ivc mateo-ivc deleted the mi/import-board branch November 11, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants