Skip to content

Commit

Permalink
Cleaned up styling a bit on the editor so it looks polished.
Browse files Browse the repository at this point in the history
  • Loading branch information
thekevinbrown committed Feb 21, 2025
1 parent eba19ef commit 38615f7
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/examples/s3-storage/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export type AdminUiFieldExtensionsMetadata = {
export type AdminUiFieldMetadata = {
__typename?: 'AdminUiFieldMetadata';
attributes?: Maybe<AdminUiFieldAttributeMetadata>;
detailPanelInputComponent?: Maybe<DetailPanelInputComponent>;
extensions?: Maybe<AdminUiFieldExtensionsMetadata>;
filter?: Maybe<AdminUiFilterMetadata>;
hideInDetailForm?: Maybe<Scalars['Boolean']['output']>;
Expand Down Expand Up @@ -118,6 +119,17 @@ export type DeleteOneFilterInput = {
id: Scalars['ID']['input'];
};

export type DetailPanelInputComponent = {
__typename?: 'DetailPanelInputComponent';
name: DetailPanelInputComponentOption;
options?: Maybe<Scalars['JSON']['output']>;
};

export enum DetailPanelInputComponentOption {
RichText = 'RICH_TEXT',
Text = 'TEXT'
}

export type GraphweaverMedia = {
__typename?: 'GraphweaverMedia';
filename: Scalars['String']['output'];
Expand Down
12 changes: 12 additions & 0 deletions src/examples/s3-storage/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export type AdminUiFieldExtensionsMetadata = {
export type AdminUiFieldMetadata = {
__typename?: 'AdminUiFieldMetadata';
attributes?: Maybe<AdminUiFieldAttributeMetadata>;
detailPanelInputComponent?: Maybe<DetailPanelInputComponent>;
extensions?: Maybe<AdminUiFieldExtensionsMetadata>;
filter?: Maybe<AdminUiFilterMetadata>;
hideInDetailForm?: Maybe<Scalars['Boolean']['output']>;
Expand Down Expand Up @@ -118,6 +119,17 @@ export type DeleteOneFilterInput = {
id: Scalars['ID']['input'];
};

export type DetailPanelInputComponent = {
__typename?: 'DetailPanelInputComponent';
name: DetailPanelInputComponentOption;
options?: Maybe<Scalars['JSON']['output']>;
};

export enum DetailPanelInputComponentOption {
RichText = 'RICH_TEXT',
Text = 'TEXT'
}

export type GraphweaverMedia = {
__typename?: 'GraphweaverMedia';
filename: Scalars['String']['output'];
Expand Down
12 changes: 12 additions & 0 deletions src/examples/xero/src/frontend/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export type AdminUiFieldExtensionsMetadata = {
export type AdminUiFieldMetadata = {
__typename?: 'AdminUiFieldMetadata';
attributes?: Maybe<AdminUiFieldAttributeMetadata>;
detailPanelInputComponent?: Maybe<DetailPanelInputComponent>;
extensions?: Maybe<AdminUiFieldExtensionsMetadata>;
filter?: Maybe<AdminUiFilterMetadata>;
hideInDetailForm?: Maybe<Scalars['Boolean']['output']>;
Expand Down Expand Up @@ -250,6 +251,17 @@ export type DeleteOneFilterInput = {
id: Scalars['ID']['input'];
};

export type DetailPanelInputComponent = {
__typename?: 'DetailPanelInputComponent';
name: DetailPanelInputComponentOption;
options?: Maybe<Scalars['JSON']['output']>;
};

export enum DetailPanelInputComponentOption {
RichText = 'RICH_TEXT',
Text = 'TEXT'
}

export type Mutation = {
__typename?: 'Mutation';
/** Create a single Account. */
Expand Down
12 changes: 12 additions & 0 deletions src/examples/xero/src/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export type AdminUiFieldExtensionsMetadata = {
export type AdminUiFieldMetadata = {
__typename?: 'AdminUiFieldMetadata';
attributes?: Maybe<AdminUiFieldAttributeMetadata>;
detailPanelInputComponent?: Maybe<DetailPanelInputComponent>;
extensions?: Maybe<AdminUiFieldExtensionsMetadata>;
filter?: Maybe<AdminUiFilterMetadata>;
hideInDetailForm?: Maybe<Scalars['Boolean']['output']>;
Expand Down Expand Up @@ -250,6 +251,17 @@ export type DeleteOneFilterInput = {
id: Scalars['ID']['input'];
};

export type DetailPanelInputComponent = {
__typename?: 'DetailPanelInputComponent';
name: DetailPanelInputComponentOption;
options?: Maybe<Scalars['JSON']['output']>;
};

export enum DetailPanelInputComponentOption {
RichText = 'RICH_TEXT',
Text = 'TEXT'
}

export type Mutation = {
__typename?: 'Mutation';
/** Create a single Account. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

.popup {
position: absolute;
z-index: 2;
z-index: 1000;
top: 95%;
background-color: #1c1725;
border: 1px solid var(--detail-border-color);
Expand Down Expand Up @@ -110,6 +110,7 @@
color: var(--body-copy-color);
border-radius: 6px 0px 0px 6px;
padding-right: 10px;
outline: 1px solid var(--body-copy-color);
}

/* Styling overrides for react-day-picker */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ export const RichTextField = (props: Props) => {
setValue(props.editor.getHTML());
}}
editable={!isReadOnly}
editorContainerProps={{
className: styles.editorContainer,
}}
editorProps={{
attributes: {
class: styles.editor,
},
}}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,13 @@
white-space: revert;
word-wrap: revert;
}

/* We want the focus rectangle to appear all the way around the editor and toolbar,
so hide the outline on the text box and add a border to the richText container. */
.richText:focus-within {
border: 1px solid var(--body-copy-color);
}

.editor:focus {
outline: none;
}

0 comments on commit 38615f7

Please sign in to comment.