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

WYSIWYG design improvements #6901

Merged
merged 9 commits into from
Oct 17, 2022

Conversation

Velin92
Copy link
Member

@Velin92 Velin92 commented Oct 17, 2022

Improvements to match as closely as possible the Figma designs

RPReplay_Final1666023682.MP4

@Velin92 Velin92 requested a review from langleyd October 17, 2022 16:27
Copy link
Member

@langleyd langleyd left a comment

Choose a reason for hiding this comment

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

Just 1 query. Also if you could add the changelog entry. Otherwise looks good.

@@ -40,13 +40,21 @@ struct Composer: View {
}

private var cornerRadius: CGFloat {
viewModel.viewState.shouldDisplayContext ? 14 : borderHeight / 2
if viewModel.viewState.shouldDisplayContext || wysiwygViewModel.idealHeight > minTextViewHeight {
Copy link
Member

Choose a reason for hiding this comment

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

Why is this line needed? I was thinking of removing idealHeight from the viewmodel. :)

Copy link
Member Author

@Velin92 Velin92 Oct 17, 2022

Choose a reason for hiding this comment

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

essentially Callum told me that we would like to have that when we have more than 1 single line in the text view, the corner radius of the border should be 14 instead of half the border height.
So by comparing the current ideal height with the minHeight I can determine if it has been increased from 1 single line to multiple lines, and decide which corner radius the view should display

@Velin92 Velin92 linked an issue Oct 17, 2022 that may be closed by this pull request
@sonarqubecloud
Copy link

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

@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Base: 6.17% // Head: 6.14% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (9338790) compared to base (0340023).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6901      +/-   ##
===========================================
- Coverage     6.17%    6.14%   -0.03%     
===========================================
  Files         1571     1590      +19     
  Lines       156062   156558     +496     
  Branches     63028    63179     +151     
===========================================
- Hits          9632     9627       -5     
- Misses      146001   146503     +502     
+ Partials       429      428       -1     
Impacted Files Coverage Δ
...tSwiftUI/Modules/Room/Composer/View/Composer.swift 0.00% <0.00%> (ø)
...Modules/Room/Composer/View/FormattingToolbar.swift 0.00% <0.00%> (ø)
Riot/Modules/MatrixKit/Models/Account/MXKAccount.m 13.23% <0.00%> (-0.39%) ⬇️
Riot/Modules/Room/RoomViewController.m 0.00% <0.00%> (ø)
Riot/Modules/Room/RoomCoordinator.swift 0.00% <0.00%> (ø)
Riot/Modules/Settings/SettingsViewController.m 0.00% <0.00%> (ø)
Riot/Modules/Room/CellData/RoomBubbleCellData.m 0.00% <0.00%> (ø)
...cast/VoiceBroadcastSDK/VoiceBroadcastService.swift 0.00% <0.00%> (ø)
...Cells/Styles/Plain/PlainRoomTimelineCellProvider.m 0.00% <0.00%> (ø)
...lls/Styles/Bubble/BubbleRoomTimelineCellProvider.m 0.00% <0.00%> (ø)
... and 22 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/26YuhT

@Velin92 Velin92 merged commit 0f631aa into develop Oct 17, 2022
@Velin92 Velin92 deleted the mauroromito/wysiwyg_toolbar_design_improvements branch October 17, 2022 19:10
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.

Rich Text Editor: Matching designs
2 participants