feat(deck-description): 'Format as Markdown' support & various UX improvements#18748
feat(deck-description): 'Format as Markdown' support & various UX improvements#18748david-allison merged 14 commits intoankidroid:mainfrom
Conversation
|
Important Maintainers: This PR contains Strings changes
|
df7a81b to
c852c79
Compare
c852c79 to
380296b
Compare
|
Updated screenshots, added corners via Long string to prove that the checkbox remains on screen |
380296b to
6626e0a
Compare
6626e0a to
8beea87
Compare
lukstbit
left a comment
There was a problem hiding this comment.
The dialog expands to occupy full width of the screen(most obvious in tablets).
The user input is not saved if the app goes in the background and then comes back.
I know that I'm one of the people that approved the initial code but after looking at this the last couple of days I would recommend that we use a standard dialog with Cancel/Save buttons at the bottom instead of the current toolbar actions approach(used probably because the dialog doesn't play too well with very big content but I think we could get round this somehow).
Also, I'm surprised that you didn't use a ViewModel.
| currentDescription = getDescription() | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
| this.dialogView = layoutInflater.inflate(R.layout.dialog_deck_description, null) | ||
| return MaterialAlertDialogBuilder(requireContext()) |
There was a problem hiding this comment.
Seeing that MaterialAlertDialogBuilder doesn't produce an ui like AlertDialog does we should settle which one we use going forward.
There was a problem hiding this comment.
Let's discuss:
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/EditDeckDescriptionDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/EditDeckDescriptionDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/ui/DelegatedViewProperties.kt
Outdated
Show resolved
Hide resolved
71a3b4e to
064d2cc
Compare
|
@lukstbit I have handled all requests
|
53057d0 to
5ff75ea
Compare
|
@david-allison merge queue caught a quiet conflict with refactorings and order of merge... |
I'm not sure if we'll want to implement the setter, but the getter is useful https://redirect.github.com/ankitects/anki/commit/ded626f0b9685355e9856c352daf21c09382999e Issue 18749
* fix margins to be standard 24dp * add icon for save * add content description for 'close' Fixes Issue 18528
* touch outside -> no-op
* fixes saved state restoration
Note that this option has unintended consequences. * `<img>` tags, are now stripped, although they work with the option disabled * It does not work on old versions of Anki https://redirect.github.com/ankitects/anki/commit/ded626f0b9685355e9856c352daf21c09382999e Issue 18749
Adds rounded corners Issue 18528
Requested in review, instead of icons Issue 18749
Didn't look good on tablets
e55be13 to
e312461
Compare
|
Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR. Read more about updating strings on the wiki, |

Purpose / Description
I was looking into #18528. While I was making improvements to the screen, I found that the 'Anki 2.1.41+ handling' checkbox upstream enabled markdown support (but disabled
<img>), so I added support for itFormat as Markdownis enabledFixes
Approach
mdproperty ofdeckmdviaEditDeckDescriptionDialogEditDeckDescriptionDialogHow Has This Been Tested?
new

older
Learning (optional, can help others)
ankitects/anki@ded626f
Checklist