Skip to content
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/FeedHeader/components/Controls/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import * as React from 'react';

import {useAnalytics} from '@gravity-ui/page-constructor';
import {Button, Icon, MobileProvider, Select} from '@gravity-ui/uikit';
import {Bookmark} from '@gravity-ui/icons';

import {DefaultGoalIds} from '../../../../constants';
import {LikesContext} from '../../../../contexts/LikesContext';
import {MobileContext} from '../../../../contexts/MobileContext';
import {AnalyticsCounter} from '../../../../counters/utils';
import {Keyset, i18n} from '../../../../i18n';
import {Save} from '../../../../icons/Save';
import {DefaultEventNames, FetchArgs, Query} from '../../../../models/common';
import {block} from '../../../../utils/cn';
import {Search} from '../../../Search/Search';
Expand Down Expand Up @@ -208,7 +208,7 @@ export const Controls = ({
selected={savedOnly}
>
<Icon
data={Save}
data={Bookmark}
size={ICON_SIZE}
className={b('icon', {savedOnly})}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

$block: '.#{$namespace}feed-custom-switcher';

$clearIconSize: 11px;
$clearIconSize: 18px;

#{$block} {
$root: &;
Expand Down Expand Up @@ -39,7 +39,7 @@ $clearIconSize: 11px;
.g-select-clear {
width: $clearIconSize;
height: $clearIconSize;
margin-right: 9px;
margin-right: 6px;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as React from 'react';

import {Icon, SelectProps, useUniqId} from '@gravity-ui/uikit';
import {ChevronDown, Xmark} from '@gravity-ui/icons';

import {DropdownArrow} from '../../../../icons/DropdownArrow';
import {Close} from '../../../../icons/Close';
import {block} from '../../../../utils/cn';
import {SelectItem} from '../Controls/Controls';

Expand Down Expand Up @@ -31,7 +30,6 @@ export type CustomSwitcherProps = {
Pick<TriggerProps, 'id' | 'disabled' | 'type'>;

const ICON_SIZE = 12;
const CLEAR_ICON_SIZE = 11;

export const CustomSwitcher = ({
id,
Expand Down Expand Up @@ -80,17 +78,15 @@ export const CustomSwitcher = ({
</div>
{renderClear &&
renderClear({
renderIcon: () => (
<Icon data={Close} size={CLEAR_ICON_SIZE} className={b('clear')} />
),
renderIcon: () => <Icon data={Xmark} className={b('clear')} />,
})}
{hasCounter && (
<div className={b('custom-switcher-element', {counter: true})}>
{itemsNames.length}
</div>
)}
<div className={b('custom-switcher-element', {arrow: true})}>
<Icon data={DropdownArrow} size={ICON_SIZE} className={b('switcher-arrow')} />
<Icon data={ChevronDown} size={ICON_SIZE} className={b('switcher-arrow')} />
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/PostInfo/components/ReadingTime.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Icon} from '@gravity-ui/uikit';
import {Clock} from '@gravity-ui/icons';

import {Keyset, i18n} from '../../../i18n';
import {Time} from '../../../icons/Time';
import {block} from '../../../utils/cn';

import {QAProps} from '../../../models/common';
Expand All @@ -20,7 +20,7 @@ type ReadingTimeProps = QAProps & {
export const ReadingTime = ({readingTime, size = 's', id, qa}: ReadingTimeProps) => (
<div className={b('item', {size})} id={id} data-qa={qa}>
<span className={b('icon')}>
<Icon data={Time} size={ICON_SIZE} className={b('icon-color')} />
<Icon data={Clock} size={ICON_SIZE} className={b('icon-color')} />
</span>
{i18n(Keyset.ContextReadingTime, {count: readingTime})}
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/components/PostInfo/components/Save.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ import * as React from 'react';

import {AnalyticsEventsProp, useAnalytics} from '@gravity-ui/page-constructor';
import {Icon, useUniqId} from '@gravity-ui/uikit';
import {Bookmark, BookmarkFill} from '@gravity-ui/icons';

import {LikesContext} from '../../../contexts/LikesContext';
import {Save as SaveIcon} from '../../../icons/Save';
import {SaveFilled} from '../../../icons/SaveFilled';
import {DefaultEventNames, QAProps} from '../../../models/common';
import {block} from '../../../utils/cn';
import {postLikeStatus} from '../../../utils/common';
import {Keyset, i18n} from '../../../i18n';

import '../PostInfo.scss';
import {Keyset, i18n} from '../../../i18n';

const ICON_SIZE = 16;

Expand Down Expand Up @@ -87,7 +86,7 @@ export const Save = ({
<div className={b('content', {cursor: isLikeable, theme})}>
<span className={b('icon')}>
<Icon
data={hasUserLike ? SaveFilled : SaveIcon}
data={hasUserLike ? BookmarkFill : Bookmark}
size={ICON_SIZE}
className={b({filled: Boolean(hasUserLike)})}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/PostInfo/components/Sharing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import * as React from 'react';

import {ShareLayoutDirection, SharePopover} from '@gravity-ui/components';
import {AnalyticsEventsProp, useAnalytics} from '@gravity-ui/page-constructor';
import {ArrowUpFromSquare} from '@gravity-ui/icons';

import {MobileContext} from '../../../contexts/MobileContext';
import {PostPageContext} from '../../../contexts/PostPageContext';
import {RouterContext} from '../../../contexts/RouterContext';
import {Keyset, i18n} from '../../../i18n';
import {ShareArrowUp} from '../../../icons/ShareArrowUp';
import {DefaultEventNames} from '../../../models/common';
import {block} from '../../../utils/cn';
import {getAbsolutePath} from '../../../utils/common';
Expand Down Expand Up @@ -43,7 +43,7 @@ export const Sharing = ({theme, analyticsEvents}: SharingProps) => {
useWebShareApi={isMobile}
direction={ShareLayoutDirection.Column}
buttonTitle={i18n(Keyset.ActionShare)}
customIcon={ShareArrowUp}
customIcon={ArrowUpFromSquare}
placement="bottom"
openByHover={false}
shareOptions={shareOptions}
Expand Down
4 changes: 4 additions & 0 deletions src/components/Search/Search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ $block: '.#{$namespace}search';
background: none;
color: var(--g-color-text-hint);
cursor: pointer;

&_close {
padding-right: 5px;
}
}

&__search-suggest {
Expand Down
11 changes: 5 additions & 6 deletions src/components/Search/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import * as React from 'react';

import {Icon, TextInput} from '@gravity-ui/uikit';
import {Magnifier, Xmark} from '@gravity-ui/icons';
import lodashDebounce from 'lodash/debounce';

import {useIsIPhone} from '../../hooks/useIsIPhone';
import {Keyset, i18n} from '../../i18n';
import {Close} from '../../icons/Close';
import {SearchIcon} from '../../icons/SearchIcon';
import {ClassNameProps} from '../../models/common';
import {block} from '../../utils/cn';

Expand All @@ -28,7 +27,7 @@ interface SearchProps extends ClassNameProps {
}

const SEARCH_ICON_SIZE = 16;
const CLOSE_ICON_SIZE = 12;
const CLOSE_ICON_SIZE = 20;
const AUTOFOCUS_TIMEOUT = 0;

/**
Expand Down Expand Up @@ -66,7 +65,7 @@ export const Search = ({
}, [autoFocus, inputRef, isIPhone]);

const rightContent = React.useMemo(() => {
const iconData = value ? Close : SearchIcon;
const isClose = Boolean(value);
const iconSize = value ? CLOSE_ICON_SIZE : SEARCH_ICON_SIZE;

const handleClick = () => {
Expand All @@ -80,12 +79,12 @@ export const Search = ({

return (
<button
className={b('input-icon')}
className={b('input-icon', {close: isClose})}
onClick={handleClick}
aria-label={value ? i18n(Keyset.ClearAction) : undefined}
aria-hidden={!value}
>
<Icon size={iconSize} data={iconData} />
<Icon size={iconSize} data={isClose ? Xmark : Magnifier} />
</button>
);
}, [handleChange, onSubmit, value]);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions src/icons/Close.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/icons/DropdownArrow.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/icons/Save.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/icons/SaveFilled.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/icons/SearchIcon.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/icons/ShareArrowUp.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/icons/Time.tsx

This file was deleted.