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: adds advanced link handling in core #3455

Merged
merged 4 commits into from
Jun 21, 2022
Merged

Conversation

luceos
Copy link
Member

@luceos luceos commented Jun 10, 2022

Changes proposed in this pull request:

This PR adds rel and target to textformatter so that these can be easily extended and rendered into the source.

Without using the Extender the default values ngc nofollow are provided as a backward compatible way.

The new extender allows conditional overrides, a proof of concept extension is available at https://github.com/luceos/flarum-ext-dofollow; I will probably migrate this into the Blomstra namespace soon.

Reviewers should focus on:

  • is the extender okay like this
  • does the fallback work like before

Screenshot

Extension disabled

image

Extension enabled

image

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

luceos and others added 2 commits June 10, 2022 18:21
This PR adds rel and target to textformatter so that these can be easily extended and rendered into the source.

Without using the Extender the default values `ngc nofollow` are provided as a backward compatible way.

The new extender allows conditional overrides, a proof of concept extension is available at https://github.com/luceos/flarum-ext-dofollow; I will probably migrate this into the Blomstra namespace soon.
@luceos luceos added this to the 1.4 milestone Jun 21, 2022
@luceos luceos self-assigned this Jun 21, 2022
@luceos luceos merged commit 0859bb1 into main Jun 21, 2022
@luceos luceos deleted the dk/advanced-links-handling branch June 21, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants