mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +08:00
CODE-520: Fixed text wrapping on buttons in Compare page
This commit is contained in:
parent
c1a23445dd
commit
11bd10f455
@ -8,6 +8,7 @@ html[class=''] {
|
||||
--border: 1px solid var(--grey-200) !important;
|
||||
--background-color-active: var(--white) !important;
|
||||
--box-shadow: none !important;
|
||||
white-space: nowrap !important;
|
||||
|
||||
&:active,
|
||||
&:hover,
|
||||
|
@ -42,6 +42,7 @@ export const BranchTagSelect: React.FC<BranchTagSelectProps> = ({
|
||||
forBranchesOnly,
|
||||
labelPrefix,
|
||||
placeHolder,
|
||||
className,
|
||||
...props
|
||||
}) => {
|
||||
const [query, onQuery] = useState('')
|
||||
@ -50,7 +51,7 @@ export const BranchTagSelect: React.FC<BranchTagSelectProps> = ({
|
||||
|
||||
return (
|
||||
<Button
|
||||
className={css.button}
|
||||
className={cx(css.button, className)}
|
||||
text={
|
||||
text ? (
|
||||
labelPrefix ? (
|
||||
|
@ -5,10 +5,14 @@
|
||||
> div {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button {
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
}
|
||||
|
||||
.branchDropdown {
|
||||
background-color: var(--white);
|
||||
.branchTagDropdown {
|
||||
--background-color: var(--white) !important;
|
||||
}
|
||||
|
||||
.mergeText {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// this is an auto-generated file
|
||||
declare const styles: {
|
||||
readonly main: string
|
||||
readonly branchDropdown: string
|
||||
readonly branchTagDropdown: string
|
||||
readonly mergeText: string
|
||||
readonly popover: string
|
||||
readonly menuItem: string
|
||||
|
@ -63,7 +63,7 @@ export function CompareContentHeader({
|
||||
onSelect={onTargetGitRefChanged}
|
||||
labelPrefix={getString('prefixBase')}
|
||||
placeHolder={getString('selectBranchPlaceHolder')}
|
||||
style={{ '--background-color': 'var(--white)' } as React.CSSProperties}
|
||||
className={css.branchTagDropdown}
|
||||
/>
|
||||
<Icon name="arrow-left" size={14} />
|
||||
<BranchTagSelect
|
||||
@ -74,7 +74,7 @@ export function CompareContentHeader({
|
||||
onSelect={onSourceGitRefChanged}
|
||||
labelPrefix={getString('prefixCompare')}
|
||||
placeHolder={getString('selectBranchPlaceHolder')}
|
||||
style={{ '--background-color': 'var(--white)' } as React.CSSProperties}
|
||||
className={css.branchTagDropdown}
|
||||
/>
|
||||
{!!targetGitRef && !!sourceGitRef && (
|
||||
<MergeableLabel repoMetadata={repoMetadata} targetGitRef={targetGitRef} sourceGitRef={sourceGitRef} />
|
||||
@ -146,7 +146,7 @@ const MergeableLabel: React.FC<Pick<CompareContentHeaderProps, 'repoMetadata' |
|
||||
<Text
|
||||
className={css.mergeText}
|
||||
icon={loading ? 'spinner' : mergeable === true ? 'command-artifact-check' : 'cross'}
|
||||
iconProps={{ color }}
|
||||
iconProps={{ color, margin: { right: 'xsmall' } }}
|
||||
color={color}>
|
||||
{loading ? '' : error ? getErrorMessage(error) : getString(mergeable ? 'pr.ableToMerge' : 'pr.cantMerge')}
|
||||
</Text>
|
||||
|
@ -12,7 +12,6 @@ import {
|
||||
} from '@harness/uicore'
|
||||
import ReactTimeago from 'react-timeago'
|
||||
import { Render } from 'react-jsx-match'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { CodeIcon, GitInfoProps } from 'utils/GitUtils'
|
||||
import { MarkdownViewer } from 'components/MarkdownViewer/MarkdownViewer'
|
||||
import { useStrings } from 'framework/strings'
|
||||
@ -21,9 +20,9 @@ import type { CommentItem } from 'components/CommentBox/CommentBox'
|
||||
import { formatDate, formatTime, PullRequestSection } from 'utils/Utils'
|
||||
import { CommentType } from 'components/DiffViewer/DiffViewerUtils'
|
||||
import { useAppContext } from 'AppContext'
|
||||
import css from './Conversation.module.scss'
|
||||
import { CommitActions } from 'components/CommitActions/CommitActions'
|
||||
import { PipeSeparator } from 'components/PipeSeparator/PipeSeparator'
|
||||
import css from './Conversation.module.scss'
|
||||
|
||||
interface SystemCommentProps extends Pick<GitInfoProps, 'pullRequestMetadata'> {
|
||||
commentItems: CommentItem<TypesPullReqActivity>[]
|
||||
|
Loading…
Reference in New Issue
Block a user