Skip to content

Commit

Permalink
feat: More readable Document settings
Browse files Browse the repository at this point in the history
First implementation of gristlabs#1289
  • Loading branch information
hexaltation committed Jan 13, 2025
1 parent 5d4a914 commit 780b0cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/client/ui/AdminPanelCss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const cssItem = styled('div', `

const cssItemShort = styled('div', `
display: flex;
flex-wrap: wrap;
flex-wrap: nowrap;
align-items: center;
padding: 8px;
margin: 0 -8px;
Expand All @@ -131,7 +131,7 @@ const cssItemShort = styled('div', `
`);

const cssItemName = styled('div', `
width: 150px;
width: 230px;
font-weight: bold;
display: flex;
align-items: center;
Expand Down Expand Up @@ -159,6 +159,7 @@ const cssItemName = styled('div', `
`);

const cssItemDescription = styled('div', `
max-width: 250px;
margin-right: auto;
margin-bottom: -1px; /* aligns with the value */
`);
Expand Down
10 changes: 7 additions & 3 deletions app/client/ui/DocumentSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class DocSettingsPage extends Disposable {
const isDocEditor = isOwnerOrEditor(docPageModel.currentDoc.get());

return cssContainer(
dom.create(AdminSection, t('Document Settings'), [
dom.create(cssAdminSection, t('Document Settings'), [
dom.create(AdminSectionItem, {
id: 'timezone',
name: t('Time Zone'),
Expand All @@ -87,7 +87,7 @@ export class DocSettingsPage extends Disposable {
}),
]),

dom.create(AdminSection, t('Data Engine'), [
dom.create(cssAdminSection, t('Data Engine'), [
dom.create(AdminSectionItem, {
id: 'timings',
name: t('Formula timer'),
Expand Down Expand Up @@ -137,7 +137,7 @@ export class DocSettingsPage extends Disposable {
}) : null,
]),

dom.create(AdminSection, t('API'), [
dom.create(cssAdminSection, t('API'), [
dom.create(AdminSectionItem, {
id: 'documentId',
name: t('Document ID'),
Expand Down Expand Up @@ -509,3 +509,7 @@ const cssWrap = styled('p', `
const cssRedText = styled('span', `
color: ${theme.errorText};
`);

const cssAdminSection = styled(AdminSection, `
max-width: 750px;
`);

0 comments on commit 780b0cc

Please sign in to comment.