Skip to content

Commit 9e1ab03

Browse files
committed
fix(devtools): adjust max-width values in use-styles and enhance SERP preview text handling
This commit updates the max-width values for certain styles in the use-styles.ts file, increasing the desktop max-width to 620px and decreasing the mobile max-width to 328px. Additionally, it introduces new functions in serp-preview.tsx for measuring text width and truncating text based on width and line limits, improving the handling of SERP previews for better SEO representation.
1 parent a197f69 commit 9e1ab03

File tree

2 files changed

+288
-45
lines changed

2 files changed

+288
-45
lines changed

packages/devtools/src/styles/use-styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ const stylesFactory = (theme: DevtoolsStore['settings']['theme']) => {
281281
border-radius: 8px;
282282
padding: 1rem 1.25rem;
283283
background: ${t(colors.white, colors.darkGray[900])};
284-
max-width: 600px;
284+
max-width: 620px;
285285
font-family: ${fontFamily.sans};
286286
box-shadow: 0 1px 2px ${t('rgba(0,0,0,0.04)', 'rgba(0,0,0,0.08)')};
287287
`,
@@ -290,7 +290,7 @@ const stylesFactory = (theme: DevtoolsStore['settings']['theme']) => {
290290
border-radius: 8px;
291291
padding: 1rem 1.25rem;
292292
background: ${t(colors.white, colors.darkGray[900])};
293-
max-width: 380px;
293+
max-width: 328px;
294294
font-family: ${fontFamily.sans};
295295
box-shadow: 0 1px 2px ${t('rgba(0,0,0,0.04)', 'rgba(0,0,0,0.08)')};
296296
`,

0 commit comments

Comments
 (0)