Create SaaStr Landing Page with new DemoSetupPage component#24649
Conversation
|
|
||
| const propTypes = { | ||
| /** Override the green headline copy */ | ||
| customHeadline: PropTypes.string, |
There was a problem hiding this comment.
NAB. I think this should be headline or headlineText and marked as required.
The better alternative is to just make the default value props.translate('login.hero.header') but I don't think this is possible, we can't make the default value of one prop dependent on another prop.
There was a problem hiding this comment.
but I don't think this is possible, we can't make the default value of one prop dependent on another prop.
Yeah this was my thought as well- I agree it would be better as required and then just pass the headline function as an option to the react navigator stack
I think for now, we can leave this as is, as it'll only be used for conferences and creating custom sign in pages for events such as in this PR
There was a problem hiding this comment.
NAB too, but if you wanted to do what @s77rt is suggesting, headline would receive the translation key and default to login.hero.header
When you use the component in the Demo page, you would pass the prop like:
<SignInPage customHeadline="login.hero.demoHeadline" />instead of
<SignInPage customHeadline={translate('login.hero.demoHeadline')} />but again, NAB, I don't feel like this is better or worse, just an alternative
PD:
{props.customHeadline || props.translate('login.hero.header')}would become
{props.translate(props.headline)}There was a problem hiding this comment.
To be honest, I don't think that this change is worth blocking the PR since this is a critical issue
There was a problem hiding this comment.
I'll add a link to this comment in the description of this PR for the next time we update the demos?
There was a problem hiding this comment.
Sounds good to me 👍
Reviewer Checklist
Screenshots/Videos |
Co-authored-by: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com>
|
@aldo-expensify 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] |
|
cc @Beamanator if you want to review for SaaStr project! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Innnnteresting, I didn't know we had a separate issue for this, I made my own version of this solution here - #24535 FYI we're going to have to do a very similar thing for SBE 😅 |
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.3.56-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|






Details
Creates the landing page located at
/saastrI created a new component
DemoSetupPageas outlined in the Design Doc and refactored the Sign In Page so we can pass in a custom headline for future conferences. This can be done in two files by changinglogin.hero.demoHeadlineinen.jsandes.js:Desktop:

Mobile:

Spanish:

NOTE
For future Demos, we may want to make this modification to passing in the headerPath:
#24649 (comment)
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/308667
Tests
THIS IS A WEB-ONLY CHANGE
For Web and mWeb:
For Native and Desktop:
Offline tests
QA Steps
For Web and mWeb:
For Native and Desktop:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Desktop:

Mobile:

Mobile Web - Chrome
Mobile Web - Safari
Desktop
N/A - Custom Route

iOS
N/A - Custom Route

Android
N/A - Custom Route