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

[DEPRIORITISED] Multilingual content support #155

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

lickem22
Copy link
Contributor

@lickem22 lickem22 commented Apr 11, 2024

Reviewer: @sidravi1
Estimate: 1h


Ticket

Fixes: AAQ-185

Description

Goal

The goal of this PR is to merge add the multilingual feature to main

Changes

This feature contain the following changes:
On the backend:

  • Added a language table
  • Added endpoints for Language management
  • Added a ContentTextDB to obtain language version of contents
  • Updated content endpoints
  • Updated tests to reflect DB and model changes
    On the frontend:
  • UpdatedLanguageButtonBar to get data from DB
  • Updated contents to be displayed in different languages
  • Updated edit and add to add/edit different language versions

Future Tasks (optional)

  • Add latest-updates

How has this been tested?

This has been tested by testing the different endpoints created/modified and testing the new functionalities on the frontend to make sure it works correctly.

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)

sidravi1 and others added 22 commits March 18, 2024 12:40
Basic content grid
Alerts and Snackbars
Fixed warnings and errors in console
Better modals
Better validation errors
Basic content grid
Alerts and Snackbars
Fixed warnings and errors in console
Better modals
Better validation errors
* sort results by content_id
* Auth and access level
* fixes from review
* MUI content pages (#130)

Basic content grid
Alerts and Snackbars
Fixed warnings and errors in console
Better modals
Better validation errors

* address leftover PR#130 comments

* remove unnecessary spacing on cards

* Make page buttons circular and smaller

* cleanup imports

* add max count to title input

* Revert text box identifiers to reflect wireframe

* Cleanup text boxes in Edit

* add date back to cards to reflect wireframe

* date to 12hr format

* add space to bottom of page

* reduce cardgrid density

* change all instances of content_id to number (some where string)

* improve delete button and modal

* use the Content type in main grid

* Add skeleton of search bar

* Implement search functionality!

* remove unnecessary wrapper

* Move SearchBar and PageNavigation to components

* Move sx parameters out of SearchBar component

* Make CardsGrid backdrop persist even without cards on it

* Convert Box to FlexBox and revert to 4-columns of cards on large screens

* NavBar: add homepage link to AAQ logo

* NavBar: enable links (but disable inactive pages)

* NavBar: Make logo and user icon smaller

* Set max cards back to 12

* Use content_id as key instead of index in Grid component

* PR feedback fixes

* cleanup imports

* Simplify editAccess check boolean (use !editAccess)

* Widen gap between date and buttons on cards

---------

Co-authored-by: Sid Ravinutala <[email protected]>
* Add language table and routes as well as tests

* Add english as default language in migration

* Fix typos

* Update core_backend/migrations/versions/1ff08438751b_add_language_table.py

Co-authored-by: Amir Emami <[email protected]>

* Update core_backend/app/languages/models.py

Co-authored-by: Amir Emami <[email protected]>

* Update core_backend/app/languages/schemas.py

Co-authored-by: Amir Emami <[email protected]>

* Fix comments

* Fix typos

---------

Co-authored-by: Amir Emami <[email protected]>
* MUI content pages (#130)

Basic content grid
Alerts and Snackbars
Fixed warnings and errors in console
Better modals
Better validation errors

* Mui admin app auth (#134)

* sort results by content_id
* Auth and access level
* fixes from review

* HOTFIX: Layout import missing from "ProtectedComponent.tsx"

* MUI improvements + search bar + navbar activation (#131)

* MUI content pages (#130)

Basic content grid
Alerts and Snackbars
Fixed warnings and errors in console
Better modals
Better validation errors

* address leftover PR#130 comments

* remove unnecessary spacing on cards

* Make page buttons circular and smaller

* cleanup imports

* add max count to title input

* Revert text box identifiers to reflect wireframe

* Cleanup text boxes in Edit

* add date back to cards to reflect wireframe

* date to 12hr format

* add space to bottom of page

* reduce cardgrid density

* change all instances of content_id to number (some where string)

* improve delete button and modal

* use the Content type in main grid

* Add skeleton of search bar

* Implement search functionality!

* remove unnecessary wrapper

* Move SearchBar and PageNavigation to components

* Move sx parameters out of SearchBar component

* Make CardsGrid backdrop persist even without cards on it

* Convert Box to FlexBox and revert to 4-columns of cards on large screens

* NavBar: add homepage link to AAQ logo

* NavBar: enable links (but disable inactive pages)

* NavBar: Make logo and user icon smaller

* Set max cards back to 12

* Use content_id as key instead of index in Grid component

* PR feedback fixes

* cleanup imports

* Simplify editAccess check boolean (use !editAccess)

* Widen gap between date and buttons on cards

---------

Co-authored-by: Sid Ravinutala <[email protected]>

* Replace old admin app with new MUI admin app (#136)

* temp - remove old `src`

* temp - replace/remove files

* move logo png to inside admin app

* Add condition for catching missing content_id

* TEMP FIX: Disable missingSuspenseWithCSRBailout error. See Jira ticket 424 for details.

---------

Co-authored-by: Sid Ravinutala <[email protected]>
* List content on frontend

* Add frontend changes
* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* format code and remove extra space above add button

* Improve language filter aesthetics and resizing behaviour

* Quick cleanup

---------

Co-authored-by: amir_emami <[email protected]>
* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* edit contents

* Retrieve and delete multilingual content (#140)

* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* format code and remove extra space above add button

* Improve language filter aesthetics and resizing behaviour

* Quick cleanup

---------

Co-authored-by: amir_emami <[email protected]>

* Cleanup

* Frontend changes

* Add default language

* Remove deactivated language for edit

* Fix font bug

* Remove emotion/server

* Fix typos

* Remove package.json

---------

Co-authored-by: amir_emami <[email protected]>
* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* edit contents

* Retrieve and delete multilingual content (#140)

* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* format code and remove extra space above add button

* Improve language filter aesthetics and resizing behaviour

* Quick cleanup

---------

Co-authored-by: amir_emami <[email protected]>

* Cleanup

* Frontend changes

* Add default language

* Remove deactivated language for edit

* Fix font bug

* Add delete contents

* Code refactor to add and delete contents

* Return to landing page when all languages versions are deleted

* Remove emotion/server

* delete package-lock.json

* remove unused imports

* Cleanup

* Fix bugs

* Add requested frontend changes

* Fix text getting blank

* Update content title and texts fields

* add new line at end of package

* Fix duplicated issue

---------

Co-authored-by: amir_emami <[email protected]>
Co-authored-by: Suzin You <[email protected]>
* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* edit contents

* Retrieve and delete multilingual content (#140)

* List content on frontend

* Add frontend changes

* Update retrieve language

* Delete language

* Fix conflicts

* fix linting

* format code and remove extra space above add button

* Improve language filter aesthetics and resizing behaviour

* Quick cleanup

---------

Co-authored-by: amir_emami <[email protected]>

* Cleanup

* Frontend changes

* Add default language

* Remove deactivated language for edit

* Fix font bug

* Add delete contents

* Code refactor to add and delete contents

* Return to landing page when all languages versions are deleted

* Remove emotion/server

* delete package-lock.json

* remove unused imports

* Add tests

* Clean up

* Fix frontend bug

* fix frontend bugs

* Update admin_app/package.json

Co-authored-by: Suzin You <[email protected]>

---------

Co-authored-by: amir_emami <[email protected]>
Co-authored-by: Suzin You <[email protected]>
@lickem22 lickem22 requested a review from sidravi1 April 11, 2024 12:39
@lickem22 lickem22 mentioned this pull request Apr 12, 2024
8 tasks
@lickem22 lickem22 force-pushed the feature-multilingual branch from 4e9dfa2 to b7c13ce Compare May 28, 2024 11:11
@amiraliemami amiraliemami changed the title Multilingual support feature Multilingual content support May 31, 2024
@amiraliemami amiraliemami changed the title Multilingual content support [DEPRIORITISED] Multilingual content support Aug 28, 2024
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.

4 participants