I dislike seeing this build-time deprecation warning every build,
and investigated if we could remove this. We can't but I was able
to see when, so I wrote it out in order to not forget and spend
the time researching again
The comment I left should show up in standard searches for removable
code based on VERSION_CODES / minSdk when we bump versions
the template previewer was tightly coupled with the template editor, and
that isn't a good design. To solve that, I decoupled the template
previewer in two fragments: a view and a standalone page.
All of the original style of the template previewer was fixed.
I gave credits to BrayanDSO in TemplatePreviewerPage.kt because most of
the code is his and I don't want the credits myself
I also removed the duplicated TabLayout in the card editor because it
didn't make sense to me.
this test is marked flaky so it won't ever run in CI but it was
failing locally for me every time as it was comparing the first
char of the string it pulled to a string, instead of string vs string
* added the alertDialog when users deletes the card type that causes orphan note which describes why the card type cannot be deleted also added the messages into the strings.xml
* completing changes requested for the fix-16789
* made changes in the test file to match the text in the fix:16789
* removed the unused string after adding the new string to test case.
Keyboard shortcuts:
Ctrl+Shift+A : Add tag
Ctrl+Shift+E : Export selected cards
Ctrl+Alt+N : Reset card progress
Ctrl+Alt+T : Toggle cards/notes
T : Show filter by tags
Ctrl+Shift+S : Reposition selected cards
Ctrl+Alt+S : Show saved searches
Ctrl+S : Save search
Alt+S : Show suspended cards
Ctrl+Shift+J : Toggle bury cards
Ctrl+J : Toggle suspended cards
Ctrl+Shift+I : Card Info
Ctrl+O : Show order dialog
Ctrl+M : Mark note
Ctrl+Z : Undo
ESC : Select none
Ctrl+1 : Red flag
Ctrl+2 : Orange flag
Ctrl+3 : Green flag
Ctrl+4 : Blue flag
Ctrl+5 : Pink flag
Ctrl+6 : Turqoise flag
Ctrl+7 : Purple flag
it is relatively easy to do an rm-rf directly but there are maintained
workflow actions that remove everything for you
This is the most-maintained fork of the most popular one I've used before
It defaults to true, and each item you remove takes time. I think dotnet
is the biggest one and should be sufficient so only remove it and that
should be sufficient
In PR 16620, I encountered the following error on
ubuntu CI
After research, `CppAssetManager2` errors are typically due to memory leaks, often by not calling close on Scenarios
```
TagsDialogTest > test_SearchTag_spaceWillBeFilteredCorrectly FAILED
java.lang.OutOfMemoryError: Java heap space
at org.robolectric.res.android.ResourceTypes$ResTable_typeSpec.getSpecFlags(ResourceTypes.java:1095)
at org.robolectric.res.android.LoadedArsc$TypeSpec.GetFlagsForEntryIndex(LoadedArsc.java:116)
at org.robolectric.res.android.CppAssetManager2.FindEntry(CppAssetManager2.java:699)
at org.robolectric.res.android.CppAssetManager2.GetResource(CppAssetManager2.java:869)
at org.robolectric.res.android.CppAssetManager2.ResolveReference(CppAssetManager2.java:935)
at org.robolectric.res.android.AttributeResolution10.ApplyStyle(AttributeResolution10.java:414)
at org.robolectric.shadows.ShadowArscAssetManager10.nativeApplyStyle_measured(ShadowArscAssetManager10.java:1414)
at org.robolectric.shadows.ShadowArscAssetManager10.lambda$nativeApplyStyle$1(ShadowArscAssetManager10.java:1374)
at org.robolectric.shadows.ShadowArscAssetManager10$$Lambda/0x00007f40d092a740.run(Unknown Source)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:82)
at org.robolectric.shadows.ShadowArscAssetManager10.nativeApplyStyle(ShadowArscAssetManager10.java:1371)
at java.base/java.lang.invoke.LambdaForm$DMH/0x00007f40d0946800.invokeStatic(LambdaForm$DMH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0948800.guardWithCatch(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0ab3400.delegate(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d094ac00.guard(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d094b000.linkToCallSite(LambdaForm$MH)
at android.content.res.AssetManager.nativeApplyStyle(AssetManager.java)
at android.content.res.AssetManager.applyStyle(AssetManager.java:1147)
at java.base/java.lang.invoke.LambdaForm$DMH/0x00007f40d0941400.invokeSpecial(LambdaForm$DMH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0943c00.guardWithCatch(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0ab3000.delegate(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0946000.guard(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0946400.linkToCallSite(LambdaForm$MH)
at android.content.res.AssetManager.applyStyle(AssetManager.java)
at android.content.res.ResourcesImpl$ThemeImpl.obtainStyledAttributes(ResourcesImpl.java:1394)
at java.base/java.lang.invoke.LambdaForm$DMH/0x00007f40d035d400.invokeSpecial(LambdaForm$DMH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d093fc00.guardWithCatch(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d035dc00.delegate(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0940c00.guard(LambdaForm$MH)
at java.base/java.lang.invoke.LambdaForm$MH/0x00007f40d0941000.linkToCallSite(LambdaForm$MH)
at android.content.res.ResourcesImpl$ThemeImpl.obtainStyledAttributes(ResourcesImpl.java)
at android.content.res.Resources$Theme.obtainStyledAttributes(Resources.java:1692)
```
If a call to super is requested, `null` may be returned
In this case, `super` would be called
This is useful if you would optionally want to inherit from
a class (say `EditTextPreference`), but also allow conditionally
return a different fragment
Links to the repo are unpleasant to see:
* Link previews are too large & distracting
* Links without a preview give no context
I want something which both gives context, and is compact
`macos-clipboard-to-discord` converts an issue link:
https://github.com/ankidroid/Anki-Android/pull/16804
into:
* A link with text: "#16804: refactor/docs: `libs.versions.toml` changelogs/renames"
* Without a preview
* Redirecting to the correct PR
`./format-for-discord` performs this formatting: accepting a PR/Issue number: 16804
and outputting the above to stdout
This commit ensures that we can drop files (photos, videos, and audio) in NoteEditor (FixedEditText).
Fix: Handle minSdkVersion conflict with DropHelper and enable file drop in NoteEditor
Added DropHelperCompat to handle the incompatibility issue with DropHelper and minSdkVersion 23. The manifest merger failed with the following error:
> Manifest merger failed: uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [androidx.draganddrop:draganddrop:1.0.0] /Users/davidallison/.gradle/cache> s/8.8/transforms/0a1688833d368c1b9b07d2054911030e/transformed/draganddrop-1.0.0/AndroidManifest.xml as the library might be using APIs not available in 23
> Suggestion: use a compatible library with a minSdk of at most 23,
> or increase this project's minSdk version to at least 24,
> or use tools:overrideLibrary="androidx.draganddrop" to force usage
> (may lead to runtime failures)
To resolve this, the DropHelperCompat class is used to conditionally configure the view for drag and drop operations only when the SDK version is 24 or higher.
Context Receivers are an experimental Kotlin feature
. They will be removed and replaced with Context Parameters.
It is unlikely that there will be any overlap period, so we need
to remove our Context Receiver code, with the intention of replacing it
at a later date
> * **2.0.20**: A warning is introduced for declarations that use
> context receivers.
> The warning should mention that the design of context receivers
> is about to change, according to the new design (add a link to the KEEP/YT).
> The safest workaround is to migrate your code to extensions.
> * **2.1.20**: The implementation of context receivers is removed from the compiler.
> Effectively, this warning is turned into an error.
> Note that this part is most likely inevitable as the implementation
> of context parameters requires quite extensive refactoring in the compiler,
> and there are significant chances that we won't have either
> context receivers or context parameters at that time.
> [There is a slight chance that we'll have an early prototype of context parameters,
> but we are not counting on that.]
> * **2.2.0**: Context parameters are introduced under a new compiler flag.
https://youtrack.jetbrains.com/issue/KT-67119/Migration-warning-from-context-receivers-to-context-parameters
> **Phased removal of context receivers feature**
> In Kotlin 1.6.20, we introduced context receivers as an
> Experimental feature. After listening to community
> feedback, we've decided not to continue with it. Instead,
> we plan to introduce a replacement in future Kotlin
> releases: context parameters. You can find the proposal
> for context parameters in the KEEP.
https://kotlinlang.org/docs/whatsnew-eap.html#phased-removal-of-context-receivers-feature
Deprecated:
https://redirect.github.com/Kotlin/KEEP/blob/context-parameters/proposals/context-receivers.md
* https://redirect.github.com/Kotlin/KEEP/issues/259
To be replaced by:
https://redirect.github.com/Kotlin/KEEP/blob/context-parameters/proposals/context-parameters.md
* https://redirect.github.com/Kotlin/KEEP/issues/367
Fixes 16863
Reverts: 672b075a54
Reverts: 1c01e4cb6f
refresh fragment after one second of text changed. And hide preview icon if fragmented as there is no point of having this option because the fragment will auto-refresh the content.
This commit updates the UI to ensure that the previewer theme matches the card template editor theme.
CardTemplateEditor
- Set navigation bar color to use alternative background color
- Update background color attribute
TemplatePreviewerFragment
- Apply style to TabLayout for consistent appearance
This commit switch the previewer menu from MateralToolbar to toolbar so that it has the same menu has the editor.
It introduces setupCommonMenu and handleCommonMenuItemSelected that add the previewer's menu entry and handle them. They are called from the editor's menu if the view is fragmented, and from the previewer's own menu otherwise.
This commit adds a fragmented variable to TemplatePreviewerArguments, to
let the previewer knows whether it belongs to a fragmented view. If so,
the previewer's back button is removed, hence only the editor's back
button remain.
On xlarge screen, display the previewer on the trailing side of the card template editor
This commit introduces a new view, card_template_editor.xml, that contains the card template editor (implemented in card_template_editor_activity.xml) and potentially the previewer on xlarge screen.
CardTemplateEditor.kt simply set the content view to card_template_editor instead of card_template_editor_activity, and add the previewer if needed.