-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf!: removes unnecessary field styles from initial page response (#…
…9286) Optimizes initial page responses by removing unnecessary inline field styles that were being sent through the HTML response. The Client Config contains a large number of duplicates of the string: `"style\":{\"flex\":\"1 1 auto\"}`, one for every single field within the entirely of the config. This leads to hundreds or potentially thousands of instances of this same string, depending on the number of fields within the config itself. This is regardless of custom field widths being defined. Instead, we can do this entirely client-side, preventing this string from ever being transmitted over the network in the first place. ## Breaking Changes This only effects those who are importing Payload's field components into your own Custom Components or front-end application. The `width` prop no longer exists. It has been consolidated into the existing `style` prop. To migrate, simply move this prop as follows: ```diff import { TextInput } from '@payloadcms/ui export const MyCustomComponent = () => { return ( <TextInput - width="60%" style={{ + width: "60%, }} /> ) } ```
- Loading branch information
1 parent
665b353
commit 30947d2
Showing
28 changed files
with
159 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.