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

Internal: Create a new format Simple HTML and enable it for Posts #3015

Closed
wants to merge 5 commits into from

Conversation

T2L
Copy link
Collaborator

@T2L T2L commented Jun 29, 2022

Problem

At the moment when adding a new post plain text format is enforced, which limits users a lot.

Solution

This PR adds a new filter format: Simple HTML and enables it for posts.

Issue tracker

Theme issue tracker

N/A

How to test

  • Adding a post form now features CKEditor
  • CKEditor must include: Bold/Italics; Link/Unlink; Ordered/Unordered lists
  • Simple HTML must support mentions
  • Enable Social Embed module: Simple HTML must include the embed button
  • Editor must be available for all authenticated users

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

image

Release notes

Not yet

Change Record

Not yet

Translations

N/A

@mergeable
Copy link

mergeable bot commented Jun 29, 2022

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

@T2L T2L added team: external This PR originates from an external contributor type: feature Adds a new feature to Open Social status: needs review This pull request is waiting for a requested review and removed blocked: mergeable labels Jun 29, 2022
@T2L T2L changed the title Create a new format Simple HTML and enable it for Posts Internal: Create a new format Simple HTML and enable it for Posts Jun 29, 2022
@navneet0693 navneet0693 added team: enterprise This PR originates from the ECI team and removed team: external This PR originates from an external contributor labels Jul 6, 2022
@navneet0693
Copy link
Collaborator

@T2L Please rebase your PR.

@navneet0693 navneet0693 added status: needs work This pull request needs more work before it's ready for review needs: rebase and removed status: needs review This pull request is waiting for a requested review labels Jul 6, 2022
@mergeable mergeable bot removed the needs: rebase label Jul 6, 2022
@Ressinel Ressinel self-assigned this Aug 2, 2022
@Ressinel Ressinel added this to the 11.4.0-beta3 milestone Aug 2, 2022
@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

5 similar comments
@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@tbsiqueira tbsiqueira modified the milestones: 11.8.0-beta1, 11.8.0-rc1 Mar 1, 2023
@ribel ribel modified the milestones: 11.8.0-rc1, 12.0.0 Mar 10, 2023
@ribel ribel removed this from the 12.0.0 milestone Jun 7, 2023
@BiaInacio
Copy link
Contributor

I was testing this issue and the basic CKEditor on posts is working fine, but when I try to install the Social Embed module the site crashes and the following error is logged on report logs:
image

@Kingdutch
Copy link
Member

Closing the PR since it hasn't seen code activity in some time (sorry Bia!) and I think there are some fundamental problems with the approach that are not explained in the PR or the attached issue.

We have some code specific to text formats which can be problematic as some of the changes show. Adding a new text format is quite a can of worms.

We're also introducing a new way of text editing for users but we're not doing anything to think about how this provides a consistent UX across different input methods for our users. We already have a Restricted HTML input format but it's not documented why that is not sufficient for posts.

@Kingdutch Kingdutch closed this Aug 2, 2023
@dianahub
Copy link

i found if i modify this line : // Allowed formats.
$allowed_format = 'simple_text'; in social_editor.module to $allowed_format = 'restricted_html' and also make sure the restricted html format has a ckeditor configured to it, i get a wysiwig not only on posts but on comments as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: medium status: needs work This pull request needs more work before it's ready for review team: external This PR originates from an external contributor type: feature Adds a new feature to Open Social
Development

Successfully merging this pull request may close these issues.

9 participants