This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 833
Fix visual regressions around widget permissions #10954
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ec1437a
Add a Jest snapshot of AppPermission
luixxiul ce87a1c
Move the test inside 'for a pinned widget' category
luixxiul 53fe99e
Make only spinner message bold
luixxiul 9f7d651
Set font size specified with "mx_AppPermission_smallText" by default
luixxiul 4a697e1
Make AppPermission panel scrollable, keeping the content at the center
luixxiul 6cf7ded
Run prettier
luixxiul 245f1f1
Use Heading component
luixxiul f6c0ea2
Use Icon component
luixxiul 6b972bd
Fix the test
luixxiul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright 2023 Suguru Hirahara | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
.mx_AppWarning { | ||
font-size: $font-16px; | ||
justify-content: center; | ||
|
||
h4 { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,11 @@ import WidgetUtils from "../../../utils/WidgetUtils"; | |
import { MatrixClientPeg } from "../../../MatrixClientPeg"; | ||
import MemberAvatar from "../avatars/MemberAvatar"; | ||
import BaseAvatar from "../avatars/BaseAvatar"; | ||
import Heading from "../typography/Heading"; | ||
import AccessibleButton from "./AccessibleButton"; | ||
import TextWithTooltip from "./TextWithTooltip"; | ||
import { parseUrl } from "../../../utils/UrlUtils"; | ||
import { Icon as HelpIcon } from "../../../../res/img/feather-customised/help-circle.svg"; | ||
|
||
interface IProps { | ||
url: string; | ||
|
@@ -117,8 +119,9 @@ export default class AppPermission extends React.Component<IProps, IState> { | |
<TextWithTooltip | ||
tooltip={warningTooltipText} | ||
tooltipClass="mx_Tooltip--appPermission mx_Tooltip--appPermission--dark" | ||
class="mx_TextWithTooltip_target--helpIcon" | ||
> | ||
<span className="mx_AppPermission_helpIcon" /> | ||
<HelpIcon className="mx_Icon mx_Icon_12" /> | ||
</TextWithTooltip> | ||
); | ||
|
||
|
@@ -139,20 +142,22 @@ export default class AppPermission extends React.Component<IProps, IState> { | |
|
||
return ( | ||
<div className="mx_AppPermission"> | ||
<div className="mx_AppPermission_bolder mx_AppPermission_smallText">{_t("Widget added by")}</div> | ||
<div> | ||
{avatar} | ||
<h4 className="mx_AppPermission_bolder">{displayName}</h4> | ||
<div className="mx_AppPermission_smallText">{userId}</div> | ||
</div> | ||
<div className="mx_AppPermission_smallText">{warning}</div> | ||
<div className="mx_AppPermission_smallText"> | ||
Comment on lines
-142
to
-149
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since |
||
{_t("This widget may use cookies.")} {encryptionWarning} | ||
</div> | ||
<div> | ||
<AccessibleButton kind="primary_sm" onClick={this.props.onPermissionGranted}> | ||
{_t("Continue")} | ||
</AccessibleButton> | ||
<div className="mx_AppPermission_content"> | ||
<div className="mx_AppPermission_content_bolder">{_t("Widget added by")}</div> | ||
<div> | ||
{avatar} | ||
<Heading size="h4">{displayName}</Heading> | ||
<div>{userId}</div> | ||
</div> | ||
<div>{warning}</div> | ||
<div> | ||
{_t("This widget may use cookies.")} {encryptionWarning} | ||
</div> | ||
<div> | ||
<AccessibleButton kind="primary_sm" onClick={this.props.onPermissionGranted}> | ||
{_t("Continue")} | ||
</AccessibleButton> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This
margin-right
property is no longer necessary. This has been used to add 2px space between the question mark and "with".