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

Feature to add and delete multilingual text #147

Merged
merged 28 commits into from
Apr 9, 2024

Conversation

lickem22
Copy link
Contributor

@lickem22 lickem22 commented Apr 4, 2024

Reviewer: @sidravi1
Estimate: 1h30


Ticket

Fixes: AAQ-450

Description

Goal

The goal of this PR is to add the last feature of multilingual support which are adding a new content and deleting multilingual contents.

Changes

The following changes have made on the backend:

  • Updated thecreate endpointto only add new contents with the create content endpoint. Language versions will be added using the edit endpoint
  • Updated the edit endpoint to create Language versions of contents.
  • Updated delete endpoint to delete language version when a language_id is provided and delete the whole content otherwise.
    The following changes have been made on the backend:
  • Added a new content using the New button
  • Added a delete button on the edit page and the Content Modal to delete language versions of contents. If the last language version is deleted, the user is redirected to the content landing page.
  • Updated the back arrow to redirect to the content landing page.
  • Updated the add page to redirect to edit instead of the landing page when a new content is added/edited.

Future Tasks (optional)

With this PR, all features are implemented. The future tasks will be:

  • Add backend tests
  • Clean up (if necessary)

How has this been tested?

This is the last multilingual feature PR, so all multilingual features have been tested:

  • Adding a Content
  • Adding a language version of the content (both from landing and Modal)
  • Viewing different language versions of contents
  • Updating a content
  • Deleting a content
  • Deleting a Language version of a content
    I suggest testing all this extensively while reviewing to make sure there is no additional changes to make to the backend.

Checklist

Fill with x for completed. Delete any lines that are not relevant

  • My code follows the style guidelines of this project
  • I have reviewed my own code to ensure good quality
  • I have tested the functionality of my code to ensure it works as intended
  • I have resolved merge conflicts
  • I have updated the automated tests (if applicable)
  • I have updated the requirements (if applicable)
  • I have updated the README file (if applicable)
  • I have updated affected documentation (if applicable)

Copy link
Member

@sidravi1 sidravi1 left a comment

Choose a reason for hiding this comment

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

Thanks @lickem22 - we are almost there. Left a few comments.

Also, can you please fix these errors in the console:
image

image image

admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/components/LanguageButtonBar.tsx Outdated Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Outdated Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
@lickem22
Copy link
Contributor Author

lickem22 commented Apr 8, 2024

Thanks @lickem22 - we are almost there. Left a few comments.

Also, can you please fix these errors in the console: image

image image

Thanks Sid. I fixed most of your requests and added a few comments. Also I fixed the first bug. Howeve r I was not able to recreate the two last errors, could you let me know how to reproduce them so I can fix?

@lickem22 lickem22 requested a review from sidravi1 April 8, 2024 13:56
Copy link
Collaborator

@suzinyou suzinyou left a comment

Choose a reason for hiding this comment

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

Hello @lickem22 , thank you so much for this!! It's looking great.. though we should rethink language related UI/UX. Perhaps something we can get outside help on :-)

I am requesting just 1 change, other ones please address/create tickets as you see fit. Let me know what you think.

admin_app/package.json Outdated Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
Copy link
Collaborator

@suzinyou suzinyou left a comment

Choose a reason for hiding this comment

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

Thanks Carlos!

admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
admin_app/src/app/content/edit/page.tsx Show resolved Hide resolved
@lickem22 lickem22 requested a review from suzinyou April 9, 2024 09:48
@suzinyou suzinyou merged commit 96a8662 into feature-multilingual Apr 9, 2024
3 checks passed
@suzinyou suzinyou deleted the multilingual/add-delete branch April 9, 2024 10:24
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.

None yet

3 participants