-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Mobile: Show "Convert to Markdown" banner when opening an HTML-format note #13841
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
base: dev
Are you sure you want to change the base?
Conversation
| <a href="#" style={styles.resourceWatchBannerAction} onClick={onBannerConvertItToMarkdown}>{`${_('Convert it')}`}</a> | ||
| <button className='link-button' style={styles.resourceWatchBannerAction} onClick={convertToMarkdownBannerData.convert.onPress}>{convertToMarkdownBannerData.convert.label}</button> | ||
| {' / '} | ||
| <a href="#" style={styles.resourceWatchBannerAction} onClick={onHideBannerConvertItToMarkdown}>{_('Don\'t show this message again')}</a> | ||
| <button className='link-button' style={styles.resourceWatchBannerAction} onClick={convertToMarkdownBannerData.dismiss.onPress}>{convertToMarkdownBannerData.dismiss.label}</button> |
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.
Switching to link-buttons allows using the onPress callbacks directly (without the .preventDefaults).
|
|
||
| it.each([ | ||
| { readOnly: false, label: 'should show a warning banner when opening an HTML-format note' }, | ||
| { readOnly: true, label: 'should not show a warning banner when opening a read-only HTML note' }, |
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.
Note: This case may not have been handled before this pull request. (On desktop, the conversion banner seems to have been previously shown for read-only notes).
The banner currently uses the
|

Summary
Follow-up to #13802.
This pull request:
convertNoteToMarkdowncommand on mobile.convertNoteToMarkdowncommand to open the first converted note on mobile. Previously the parent folder of the first converted note would be selected.lib/components/shared/NoteEditor/WarningBanner/useConvertToMarkdownBanner.ts.Possible issues
joplin/packages/app-mobile/root.tsx
Line 162 in f9d5874
Screen recordings
Desktop: Regression testing
Screencast.from.2025-12-02.09-41-07.webm
The above screen recording shows:
Web
Screencast.from.2025-12-02.09-36-23.webm
The above screen recording shows:
Other testing
It has also been manually verified on both desktop and web that:
New automated tests have been added to NoteEditor.test.tsx.