Skip to content

refactor(v2): merge linkify function used in blog and docs and align properties#4402

Merged
slorber merged 4 commits into
facebook:masterfrom
armano2:refactor/linkify
Mar 12, 2021
Merged

refactor(v2): merge linkify function used in blog and docs and align properties#4402
slorber merged 4 commits into
facebook:masterfrom
armano2:refactor/linkify

Conversation

@armano2

@armano2 armano2 commented Mar 11, 2021

Copy link
Copy Markdown
Contributor

Motivation

This PR is a continuation of work done in #4391 that aligns names of properties,

i'm unsure what is a politic here on changes, that's why i prepared 2 separate PR's for this

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

there is no change in functionality and all unit test should pass, linking still should work in docs and in blog,

it can be tested by clicking in one of links in docs, eg.
https://deploy-preview-4391--docusaurus-2.netlify.app/classic/docs/contributing#get-involved

Related PRs

#4391

@netlify

netlify Bot commented Mar 11, 2021

Copy link
Copy Markdown

[V1] Deploy preview success

Built with commit 01a6fae

https://deploy-preview-4402--docusaurus-1.netlify.app

@armano2 armano2 changed the title refactor(v2): merge linkify function used in blog and docs and align properties refactor(v2): [alernative] merge linkify function used in blog and docs and align properties Mar 11, 2021
@armano2 armano2 changed the title refactor(v2): [alernative] merge linkify function used in blog and docs and align properties refactor(v2): merge linkify function used in blog and docs and align properties Mar 11, 2021
@netlify

netlify Bot commented Mar 11, 2021

Copy link
Copy Markdown

Deploy preview for docusaurus-2 ready!

Built with commit 01a6fae

https://deploy-preview-4402--docusaurus-2.netlify.app

@armano2

armano2 commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

Lighthouse failed for unknown reason

@slorber

slorber commented Mar 12, 2021

Copy link
Copy Markdown
Collaborator

Thanks, this looks like a nice code dedup refactor that I wanted to do for a while :)

I'm going to tweak some minor things before merging

@github-actions

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 94
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4402--docusaurus-2.netlify.app/classic/

@slorber

slorber commented Mar 12, 2021

Copy link
Copy Markdown
Collaborator

Basically what I did was simplify the signature of the replaceMarkdownLink function, remove the generics and return broken links instead of using a callback (will be simpler to test).

image

BTW we have tests in docs and blog, but if you want to add more isolated tests for this newly extracted method that could be useful ;)

This was referenced Mar 17, 2021
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
…properties (facebook#4402)

* refactor(v2): merge linkify function used in blog and docs

* refactor(v2): rename docsDirPath and docsDirPathLocalized ad update types

* refactor(v2): rename blogPostsBySource and update types

* improve replaceMarkdownLinks api

Co-authored-by: slorber <lorber.sebastien@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants