-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Generate the help content map file on the fly #61279
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
Conversation
@mananjadhav Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewing this PR. |
help/_plugins/SitePostRender.rb
Outdated
end | ||
|
||
def self.html_node_to_RN(node, indent_level = 0) | ||
indent = ' ' * indent_level |
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.
Should if add a check return "" if node.nil?
?
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.
Hm... Why would it be nil
?
help/_plugins/SitePostRender.rb
Outdated
"<TextLink href=\"#{href}\" style={styles.link}>#{link_text.strip}</TextLink>" | ||
|
||
when 'text' | ||
node.text |
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.
return node.text.strip.empty? ? "" : node.text ?
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.
Why?
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.
Left a few comments.
help/_plugins/SitePostRender.rb
Outdated
'' # handled in <ul> | ||
|
||
when 'strong', 'b' | ||
"<Text style={styles.textBold}>#{node.text}</Text>" |
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.
Do you think we need to be worried about any kind of nesting here?
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.
No. Do you have any concerns?
# Remove the short title from the visible header text | ||
header_text = header_text.sub(/^\[.*?\]\s*/, '') | ||
header.content = header_text | ||
# Check if the page is a reference page |
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.
what's the effort for adding a few tests for the same?
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.
Let's add the tests as a follow up?
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.
Sure.
Thanks for the quick turnaround. I am working on another PR, will get right to it once that is done. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppNAAndroid: mWeb ChromeNAiOS: HybridAppNAiOS: mWeb SafariNAMacOS: Chrome / SafariNAMacOS: DesktopNABefore: before-help-content-generator.movAfter: after-help-content-generator.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.
Thanks for addressing the comments. Looks a lot cleaner.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #61113 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
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 again to assign an internal engineer.
🚀Deployed to NewHelp production! 🚀 |
@allroundexperts Can you help with the following?
|
@allroundexperts Can you please help with the following steps?
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.1.45-0 🚀
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.1.45-0 🚀
|
@allroundexperts incase you missed it |
Hi @kavimuru! |
@allroundexperts if I'm understanding correctly, this PR is only part of the solution for #61113, is that right? Like should the codeless editing of the panel content be possible now? Or there are more PRs to make that possible? |
Not entirely possible right now. We'd need a script to transfer the generated file to the correct place. |
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.45-21 🚀
|
Explanation of Change
This PR updates the build process for help site, such that it generates the help content tsx file on the fly.
Before
https://github.com/user-attachments/assets/ef99f78d-83d4-4c85-b7f5-06e7647eb205
After
https://github.com/user-attachments/assets/30f1a844-635c-428f-9f88-c7cf7dcae598
Fixed Issues
$ #61113
PROPOSAL: N/A
Tests
Onyx.set('nvp_sidePanel', {});
Workspaces
and click on the help icon. Note the content.help
directory and executebundle exec jekyll build
help/_src/helpContentMap.tsx
and paste it intosrc/components/SidePanel/HelpContent/helpContentMap.tsx
.Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
N/A
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A
MacOS: Desktop
N/A