Skip to content

Commit

Permalink
fix(core): add maxLength to breadcrumb and change symbol (#4880)
Browse files Browse the repository at this point in the history
* fix(core): add maxLength to breadcrumb and change symbol

* fix(core): change symbol of breadcrumb separator in document history

* fix(core): conditionally set maxLength of breadcrumbs in history

* fix(core): ran prettify

* fix(core): remove maxLength of title, use icon for separator
  • Loading branch information
ninaandal committed Sep 6, 2023
1 parent 2ace4f1 commit 5c75b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
@@ -1,5 +1,6 @@
import React from 'react'
import {Breadcrumbs, Text} from '@sanity/ui'
import {ChevronRightIcon} from '@sanity/icons'
import {ChangeTitlePath, FieldChangeNode} from '../../types'
import {ChangeTitleSegment} from './ChangeTitleSegment'

Expand All @@ -9,9 +10,10 @@ export function ChangeBreadcrumb(props: {change?: FieldChangeNode; titlePath: Ch

return (
<Breadcrumbs
maxLength={4}
separator={
<Text muted size={1}>
/
<ChevronRightIcon />
</Text>
}
>
Expand Down
Expand Up @@ -25,7 +25,7 @@ export function ChangeTitleSegment(props: {

if (typeof segment === 'string') {
return (
<Box style={segment.length > 30 ? {maxWidth: 100} : {}}>
<Box>
<Text title={segment} size={1} weight="semibold" textOverflow="ellipsis">
{segment}
</Text>
Expand Down

2 comments on commit 5c75b2c

@vercel
Copy link

@vercel vercel bot commented on 5c75b2c Sep 6, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

performance-studio – ./

performance-studio-git-next.sanity.build
performance-studio.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 5c75b2c Sep 6, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

test-studio – ./

test-studio-git-next.sanity.build
test-studio.sanity.build

Please sign in to comment.