Skip to content
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

[Rich text editor] Add feature flag for rich text editor #1289

Merged
merged 1 commit into from Sep 13, 2023

Conversation

jonnyandrew
Copy link
Contributor

@jonnyandrew jonnyandrew commented Sep 12, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Add feature flag for the rich text editor.

When the feature flag is disabled, markdown support is enabled.

Motivation and context

Screenshots / GIFs

Screen_recording_20230912_174836.webm

Tests

  • Install a debug version of the app
  • Toggle the new setting in developer settings
  • Create a message with markdown
  • Edit a message with markdown
  • Reply to a message with markdown

Tested devices

  • Physical
  • Emulator
  • OS version(s): 13

Checklist

Comment on lines +149 to +152
var enableTextFormatting by remember { mutableStateOf(true) }
LaunchedEffect(Unit) {
enableTextFormatting = featureFlagService.isFeatureEnabled(FeatureFlags.RichTextEditor)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming reflects that the rich text editor is not actually toggled; it is still always running under the hood. Only the text formatting capabilities of the RTE may be disabled (i.e. HTML output ignored and formatting buttons hidden)

@ElementBot
Copy link
Collaborator

ElementBot commented Sep 12, 2023

Warnings
⚠️

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/AttachmentsBottomSheet.kt#L24 - Using a material import while also using the material3 library

⚠️

gradle/libs.versions.toml#L13 - A newer version of androidx.core:core-ktx than 1.10.1 is available: 1.12.0

⚠️

gradle/libs.versions.toml#L96 - A newer version of androidx.compose.material3:material3 than 1.2.0-alpha06 is available: 1.2.0-alpha07

Generated by 🚫 dangerJS against b584996

@jonnyandrew jonnyandrew force-pushed the jonny/rich-text-editor-feature-flag branch from 06ac18d to 99fd079 Compare September 12, 2023 16:42
@github-actions
Copy link
Contributor

github-actions bot commented Sep 12, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/w9TzQ2

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Patch coverage: 52.50% and no project coverage change.

Comparison is base (8abaee8) 57.69% compared to head (b584996) 57.69%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1289   +/-   ##
========================================
  Coverage    57.69%   57.69%           
========================================
  Files         1087     1087           
  Lines        28618    28643   +25     
  Branches      5861     5865    +4     
========================================
+ Hits         16510    16526   +16     
- Misses        9535     9542    +7     
- Partials      2573     2575    +2     
Files Changed Coverage Δ
...ries/featureflag/impl/StaticFeatureFlagProvider.kt 0.00% <0.00%> (ø)
...nt/android/libraries/matrix/api/room/MatrixRoom.kt 33.33% <ø> (ø)
...droid/libraries/matrix/impl/room/RustMatrixRoom.kt 0.00% <0.00%> (ø)
...ent/android/libraries/textcomposer/TextComposer.kt 54.94% <0.00%> (-0.16%) ⬇️
...ges/impl/messagecomposer/AttachmentsBottomSheet.kt 40.00% <25.00%> (-1.51%) ⬇️
...ndroid/features/messages/impl/MessagesPresenter.kt 81.92% <66.66%> (-0.33%) ⬇️
...nt/android/features/messages/impl/MessagesState.kt 100.00% <100.00%> (ø)
...id/features/messages/impl/MessagesStateProvider.kt 90.24% <100.00%> (+0.24%) ⬆️
...ent/android/features/messages/impl/MessagesView.kt 58.41% <100.00%> (+0.20%) ⬆️
...ssages/impl/messagecomposer/MessageComposerView.kt 54.05% <100.00%> (+4.05%) ⬆️
... and 3 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jonnyandrew jonnyandrew force-pushed the jonny/rich-text-editor-feature-flag branch from 99fd079 to b584996 Compare September 12, 2023 17:17
@jonnyandrew jonnyandrew marked this pull request as ready for review September 12, 2023 17:22
@jonnyandrew jonnyandrew requested a review from a team as a code owner September 12, 2023 17:22
@jonnyandrew jonnyandrew requested review from bmarty and removed request for a team September 12, 2023 17:22
@sonarcloud
Copy link

sonarcloud bot commented Sep 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@bmarty bmarty mentioned this pull request Sep 12, 2023
1 task
@jonnyandrew jonnyandrew merged commit 8ab391f into develop Sep 13, 2023
14 of 17 checks passed
@jonnyandrew jonnyandrew deleted the jonny/rich-text-editor-feature-flag branch September 13, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Punctuation marks are prefixed with backslashes in message body
3 participants