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

✨ Rich text input #233

Merged
merged 13 commits into from
Dec 2, 2024
Merged

✨ Rich text input #233

merged 13 commits into from
Dec 2, 2024

Conversation

brunobuddy
Copy link
Contributor

@brunobuddy brunobuddy commented Nov 28, 2024

Description

This PR implements a Rich Text property type that shows a WYSIWYG editor on admin panel. It uses Quill through ngx-quill package.

The related doc PR has to be reviewed also.

How can it be tested?

1. Read the doc

Get the doc for rich text from the website repository and change the docs/fetch-content.sh content by this one:

#!/bin/bash
# Remove the existing directory if it exists
rm -rf content

# Clone the repository into the 'content' directory
git clone --depth 1 --branch feature/rich-text https://github.com/mnfst/docs.git content

then run the docs from the website repository as explained in the readme file.

2. Follow the doc

Play around by adding a richText property and checking the list/detail/create/edit views.

Styling to be done

There is some styling to be done on this component:

General

Input

  • Bold style is not showing on the editor
  • The min height of the editor is too small
  • The width of the editor is narrow for a rich text. Can we update all of them ? See what other admin panels do
  • Style error state: add "required" validation and submit leaving blank to see it

Yield

  • Style yield in detail page

Impacted packages

Check the NPM packages that require a new publication or release:

Check list before submitting

  • I have performed a self-review of my code (no debugs, no commented code, good naming, etc.)
  • I wrote the relative tests
  • I created a PR for the documentation if necessary and attached the link to this PR
  • This PR is wrote in a clear language and correctly labeled

@brunobuddy brunobuddy added enhancement New feature or request admin panel Admin panel issues yaml YAML file issues core Core issues labels Nov 28, 2024
@brunobuddy brunobuddy requested a review from SebConejo November 28, 2024 09:46
@brunobuddy brunobuddy self-assigned this Nov 28, 2024
Copy link

vercel bot commented Nov 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
manifest-schema ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 3:37pm

@brunobuddy brunobuddy removed admin panel Admin panel issues yaml YAML file issues core Core issues labels Nov 28, 2024
@brunobuddy brunobuddy marked this pull request as ready for review December 1, 2024 09:28
@SebConejo
Copy link
Contributor

@brunobuddy
In the detail page, if teh rich text is null, we should display a small dash "-" instead of an empty block.

Capture d’écran 2024-12-02 à 15 38 40

In rich text yield component, We can add an ngIf to the "wrapper" div. And create the span to display the dash .

@brunobuddy brunobuddy merged commit ce8ada5 into develop Dec 2, 2024
4 checks passed
@brunobuddy brunobuddy deleted the feature/rich-text branch December 2, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants