-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat/addBrokenLinksReporter #1810
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
66882da
to
cc966fa
Compare
siteName | ||
) | ||
|
||
const viewableLinkInStaging = stagingUrl + viewablePageInStaging.slice(1) // rm the leading `/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is stagingUrl always guaranteed to have a trailing /
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey you are right, caught this in testing + commit is here
tldr this is fixed upstream
|
||
const { data: brokenLinks } = useGetBrokenLinks(siteName) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm by default, does a site have no errors if the error checker isn't run prior? e.g. for new sites
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey you are right on this, there is no auto link checker, since it triggered manually
Not doing this for this experiment since the ones that we are experimenting with are a select, hardcoded list which we can control.
in the future if doesnt exist, be should create!
even if we forget, this pr already has a recovery path as shown here:
Screen.Recording.2024-02-22.at.2.18.37.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexanderleegs wah you caught me tripping off alarms.
2578d9a
Fixing this issue upstream so that fe dont not ping be in the event of non feature flagged
const getBreadcrumb = (viewablePageInCms: string): string => { | ||
/** | ||
* There are four main types of pages | ||
* 1. /folders/parentFolder/subfolders/childFolder/editPage/page.md -> parentFolder/childFolder/page | ||
* 2. /folders/parentFolder/editPage/page.md -> parentFolder/page | ||
* 3. /editPage/page.md -> Feedback Form | ||
* 4. /resourceRoom/resourceRmName/resourceCategory/resourceCatName/editPage/page.md -> resourceRmName/resourceCatName/page | ||
*/ | ||
const paths = viewablePageInCms.split("/") | ||
let breadcrumb = paths | ||
.filter((_, index) => index % 2 === 0) | ||
.slice(2) | ||
.join(" / ") | ||
.replace(/-/g, " ") | ||
if (breadcrumb.endsWith(".md")) { | ||
breadcrumb = breadcrumb.slice(0, -3) | ||
} | ||
|
||
return breadcrumb | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm does the broken link checker also support homepage/navbar/contact us? The breadcrumb wouldn't work properly for those right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arh shucks you are right, missed these out. 8837e07 as a todo.
navbar is not affected since its a yml, currently the scanner doesnt scan.
bug exists for homepage + contact us, will fix upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with followups to do since this is feature flagged
Merge activity
|
Problem
Adding broken link checker to front end
Solution
Adds in the main UI for the broken link checkers. This is not design approved, the alignment with @sehyunidaaa at the moment is that we will use this to experiment how quickly users are able to repair their sites on their own before polishing the UI and removing the feature flag as a whole.
Note: the introduction of the feature flag is done in a downstream pr.
Main user page:
Screen.Recording.2024-02-22.at.12.08.16.PM.mov
Only entry point:
Screen.Recording.2024-02-22.at.12.10.43.PM.mov
Breaking Changes
Tests
/sites/<site-name>/linkCheckerReport
for any site hereDeploy Notes
Need to clone site-link checker into both prod and staging