-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[NOQA] Updating NewHelp for mobile layout #52683
Conversation
@Julesssss 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] |
Your New Help changes have been deployed to https://203e413d.newhelp.pages.dev ⚡️ |
🚀Deployed to NewHelp production! 🚀 |
🚀 Deployed to staging by https://github.com/dubielzyk-expensify in version: 9.0.64-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.64-4 🚀
|
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.
Just noticed a few things while I was doing some CAP SW reviews
</div> | ||
<div id="search-container"> | ||
<!-- Search Input styled as button --> | ||
<span id="search-icon" style="cursor: pointer; font-size: 24px;">🔍</span> |
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.
Please place all styles in the CSS file and apply them with classes or IDs as necessary.
const contextBefore = doc.content.substring(Math.max(0, searchTermIndex - 30), searchTermIndex); | ||
const contextAfter = doc.content.substring(searchTermIndex + query.length, Math.min(doc.content.length, searchTermIndex + query.length + 30)); | ||
const searchResultHtml = ` | ||
<div class="search-result"> |
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.
Please move HTML templates to the HTML file. Consider using https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template
} | ||
}); | ||
}); | ||
g_searchResults.style.display = 'block'; |
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.
Styles should only be applied by classes or IDs. I suggest having some classes like display-block
and display-none
<div id="search-results" tabindex="0" style="display:none;"></div> | ||
|
||
<!-- Footer with shortcut info --> | ||
<div id="search-footer" style="text-align: center; margin-top: 10px; font-size: 14px; color: #586069;"> |
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.
Same
Explanation of Change
Updating NewHelp to support a mobile layout. This required some extensive refactoring of the header, as it wasn't really envisioned for narrow screens. Also, took this opportunity to split up the css/html/js into different files.
Fixed Issues
n/a
Tests
This has been tested in my dev environment using Chrome, but pushing to a PR so I can test on a real phone using the staging branch in CF.
Offline tests
n/a
QA Steps
n/a
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
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.Mobile screenshots
Desktop screenshots