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

77 - make about editable #172

Merged
merged 7 commits into from
Mar 1, 2024
Merged

77 - make about editable #172

merged 7 commits into from
Mar 1, 2024

Conversation

ri-pandey
Copy link
Contributor

@ri-pandey ri-pandey commented Feb 23, 2024

Description

Made the About page's text editable via a markdown editor.

Related Issue(s)

Closes #77

Changes Made

List the main changes made in this PR. Be as specific as possible.

  • Feature added

  • Code refactored

  • Other changes: [describe]

  • Made the About page editable via a markdown input.

  • Persists sanititzed HTML. Upon retrieval, convert persisted HTML to markdown, which can then be edited to updated the About.

  • Added tabs for mobile view, and side-by-side editor/preview for desktop view.

  • The HTML generated from real-time markdown-to-HTML conversion is also sanitized.

  • About Page is globally accessible, but can only be modified by admins and operators.

  • Endpoints in the about route are authenticated, except /about/latest.

Screenshots (if applicable)

Desktop View

Screenshot 2024-02-23 at 11 36 55 AM

Mobile View

Screenshot 2024-02-23 at 11 37 29 AM

Checklist

Before submitting this PR, please make sure that:

  • Your code passes linting and coding style checks.
  • Documentation has been updated to reflect the changes.
  • You have reviewed your own code and resolved any merge conflicts.
  • You have requested a review from at least one team member.
  • Any relevant issue(s) have been linked to this PR.

* retrieve about text from api

* WIP

* escape input

* switched to markdown-it

* fixed some styles

* use toast to show errors

* size; reset after Cancel

* made height fixed; use break-words

* changed modal size

* changed Edit button

* allow users/operators to read

* some UI changes

* escape input; allow for creation or updating

* use popover to indicate syntax

* UI changes

* added unauthenticated route

* cleanup

* changed routes; UI changes

* WIP

* force equal heights; made break-words work

* use labels optionally

* WIP

* changed .gitignore; seed data

* WIP - HTML line breaks missing

* fixed several styles

* fixed spacing; fonts

* use constant height across different screen sizes

* labels as props

* edited seeding code
@ri-pandey ri-pandey self-assigned this Feb 23, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Can operators update entries, or is that something only admins can do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@deepakduggirala I have added the Edit permission for operators as well. Please approve if all else looks good.

Copy link
Contributor Author

@ri-pandey ri-pandey Feb 28, 2024

Choose a reason for hiding this comment

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

I have also added a script to populate the base About text when we release to Prod. This script is not part of the 'seed' script - it is it's own one-time script for populating data upon release - here.

@ri-pandey ri-pandey merged commit c5892ee into main Mar 1, 2024
@ri-pandey ri-pandey deleted the 77-about-main branch March 1, 2024 17:50
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.

Allow About page to be editable
2 participants