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

Update Bricks and colors #3053

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 9 additions & 129 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"@sentry/nextjs": "7.99.0",
"@tanstack/react-query": "4.29.5",
"@tanstack/react-query-devtools": "4.29.6",
"@taskany/bricks": "5.52.0",
"@taskany/colors": "1.13.0",
"@taskany/bricks": "5.52.2",
"@taskany/colors": "1.13.1",
"@taskany/icons": "2.0.7",
"@tippyjs/react": "4.2.6",
"@trpc/client": "10.35.0",
Expand Down
6 changes: 5 additions & 1 deletion src/components/CommentCreateForm/CommentCreateForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useCallback, useMemo } from 'react';
import { State as StateDataType } from '@prisma/client';

Check warning on line 2 in src/components/CommentCreateForm/CommentCreateForm.tsx

View workflow job for this annotation

GitHub Actions / build

'@prisma/client' import is restricted from being used. Use the trpc procedures inferred types instead
import { nullable, useLatest } from '@taskany/bricks';
import { IconDownSmallSolid, IconUpSmallSolid } from '@taskany/icons';
import { Avatar, Button } from '@taskany/bricks/harmony';
Expand Down Expand Up @@ -90,12 +90,15 @@

const onCancelCreate = useCallback(() => {
setBusy(false);
setFocused(false);
setPushState(stateId ? statesMap[stateId] : undefined);
setDescription('');
onCancel?.();
}, [onCancel, stateId, statesMap]);

const onBlur = useCallback(() => {
setFocused(false);
}, []);

const onStateSelect = useCallback(
(state: StateDataType) => {
setPushState((prev) => {
Expand Down Expand Up @@ -138,6 +141,7 @@
onChange={onCommentChange}
onSubmit={onCommentFormSubmit('pushState')}
onCancel={onCancelCreate}
onBlur={onBlur}
onFocus={onCommentFocus}
passedError={error}
actionButton={
Expand Down
8 changes: 4 additions & 4 deletions src/components/CommentForm/CommentForm.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

.CommentFormWrapper {
position: relative;
transition: 200ms ease-in;
transition-property: background-color;
background-color: var(--input-fill);
}

.CommentFormWrapper::before {
Expand All @@ -19,7 +18,7 @@
width: 14px;
height: 14px;

background-color: var(--background);
background-color: var(--input-fill);

border-left: 1px solid var(--input-border);
border-top: 1px solid var(--input-border);
Expand All @@ -34,5 +33,6 @@
}

.CommentFormWrapper_focused::before {
background-color: var(--input-fill-focused-borderless);
background-color: var(--input-fill-focused);
border-color: var(--input-border-focused);
}
3 changes: 3 additions & 0 deletions src/components/CommentForm/CommentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface CommentFormProps {
onSubmit: (form: CommentSchema) => void | Promise<void>;
onChange?: (form: CommentSchema) => void;
onFocus?: () => void;
onBlur?: () => void;
onCancel?: () => void;
}

Expand All @@ -35,6 +36,7 @@ export const CommentForm: React.FC<CommentFormProps> = ({
onChange,
onSubmit,
onFocus,
onBlur,
onCancel,
passedError,
}) => {
Expand Down Expand Up @@ -80,6 +82,7 @@ export const CommentForm: React.FC<CommentFormProps> = ({
placeholder={tr('Leave a comment')}
height={focused ? 120 : 80}
onCancel={onCommentCancel}
onBlur={onBlur}
onFocus={onFocus}
onUploadFail={onUploadFail}
autoFocus={autoFocus}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CommentViewHeader/CommentViewHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface CommentViewHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
export const CommentViewHeader: React.FC<CommentViewHeaderProps> = ({ name, timeAgo, href, state, ...attrs }) => {
return (
<div className={s.CommentViewHeader} {...attrs}>
<Text size="s" weight="bold">
<Text size="s" weight="semiBold">
{name}
</Text>
<span>—</span>
Expand Down
4 changes: 1 addition & 3 deletions src/components/CriteriaForm/CriteriaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ const CriteriaWeightField = forwardRef<HTMLInputElement, WeightFieldProps>(
({ error, maxValue, value, onChange, name }, ref) => {
return (
<FormControl className={s.FormControl}>
<FormControlLabel size="s" className={s.FormControlLabel}>
{tr('Weight')}
</FormControlLabel>
<FormControlLabel className={s.FormControlLabel}>{tr('Weight')}</FormControlLabel>
<FormControlInput
className={s.FormControlWeigthInput}
outline
Expand Down
2 changes: 1 addition & 1 deletion src/components/FiltersBar/FiltersBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const AddFilterDropdown = <T extends { id: string; title: string }>({

export const FiltersBarDropdownTitle: FC<ComponentProps<typeof Text>> = ({ children }) => {
return (
<Text className={s.FiltersBarDropdownTitle} weight="bold">
<Text className={s.FiltersBarDropdownTitle} weight="semiBold">
{children}
</Text>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/GoalParentDropdown/GoalParentDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const GoalParentDropdown = ({
onChange={onChange}
renderItem={(props) => (
<div className={s.DropdownPanelItem}>
<Text size="s" weight="bold" as="span" ellipsis>
<Text size="s" weight="semiBold" as="span" ellipsis>
{props.item.title}
</Text>
<Text size="s" as="span" className={s.DropdownPanelItem_id}>
Expand Down
8 changes: 4 additions & 4 deletions src/components/HistoryRecord/HistoryRecord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const HistoryRecordEstimate: React.FC<HistoryChangeProps<string>> = ({ from, to
</HistoryRecordText>
))}
to={nullable(to ? decodeHistoryEstimate(to) : null, (te) => (
<HistoryRecordText className={s.HistoryRecordTextPrimary} weight="bold" size="s">
<HistoryRecordText className={s.HistoryRecordTextPrimary} weight="semiBold" size="s">
{formateEstimate(te.date, { locale, type: te.type })}
</HistoryRecordText>
))}
Expand Down Expand Up @@ -359,12 +359,12 @@ const HistoryRecordTextChange: React.FC<HistoryChangeProps<string>> = ({ from, t
const HistoryRecordPriority: React.FC<HistoryChangeProps<Priority>> = ({ from, to }) => (
<HistorySimplifyRecord
from={nullable(from, (f) => (
<HistoryRecordText weight="bold" strike size="s" className={s.HistoryRecordTextPrimary}>
<HistoryRecordText weight="semiBold" strike size="s" className={s.HistoryRecordTextPrimary}>
{getPriorityText(f.title)}
</HistoryRecordText>
))}
to={nullable(to, (t) => (
<HistoryRecordText weight="bold" size="s" className={s.HistoryRecordTextPrimary}>
<HistoryRecordText weight="semiBold" size="s" className={s.HistoryRecordTextPrimary}>
{getPriorityText(t.title)}
</HistoryRecordText>
))}
Expand Down Expand Up @@ -443,7 +443,7 @@ const HistoryRecordCriteriaItem: React.FC<CriteriaItem> = ({ criteriaGoal, exter
}

return (
<HistoryRecordText weight="bold" size="s" strike={strike} className={s.HistoryRecordTextPrimary}>
<HistoryRecordText weight="semiBold" size="s" strike={strike} className={s.HistoryRecordTextPrimary}>
{title}
</HistoryRecordText>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/IssueKey/IssueKey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface IssueKeyProps {

export const IssueKey: React.FC<IssueKeyProps> = ({ id, size = 'm', children }) => {
return (
<Text size={size} weight="bold" className={s.IssuesKey}>
<Text size={size} weight="semiBold" className={s.IssuesKey}>
#{id} {children}
</Text>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/IssueMeta/IssueMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const IssueMeta: React.FC<IssueMetaProps> = ({ title, children, className
return (
<div className={cn(s.IssueMeta, className)} {...rest}>
{nullable(title, (t) => (
<Text size="m" weight="bold" className={s.IssueMetaTitle}>
<Text size="m" weight="semiBold" className={s.IssueMetaTitle}>
{t}
</Text>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/IssueParent/IssueParent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const IssueParent = ({ parent, size = 'l', ...props }: IssueParentProps)
const normalizedParent = ([] as Array<Parent | undefined>).concat(parent).filter(Boolean) as Array<Parent>;

return (
<Text className={s.IssueParentTitle} size={size} weight="bold" as="span" {...props}>
<Text className={s.IssueParentTitle} size={size} weight="semiBold" as="span" {...props}>
{normalizedParent.map((p, i) =>
nullable(p.id, (id) => (
<span key={id} {...goalPageHeaderParent.attr}>
Expand Down
Loading
Loading