-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Themes] Theme Dev - Display theme asset upload errors in overlay #4899
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Show files with reduced coverage 🔻
Test suite run success1967 tests passing in 892 suites. Report generated by 🧪jest coverage report action from 71baa0e |
9161725
to
84525af
Compare
dda3eb2
to
7339e19
Compare
e6fc10f
to
8211225
Compare
5bdcab1
to
f4e461b
Compare
8211225
to
3438305
Compare
26ac483
to
5107f4e
Compare
3438305
to
963940b
Compare
963940b
to
71baa0e
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/themes/types.d.ts@@ -15,6 +15,7 @@ type ThemeFSEvent = {
type: 'add' | 'change';
payload: {
fileKey: Key;
+ uploadErrors: Map<Key, string[]>;
onContent: (fn: (content: string) => void) => void;
onSync: (fn: () => void) => void;
};
@@ -93,6 +94,14 @@ export interface ThemeFileSystem extends VirtualFileSystem {
applyIgnoreFilters: <T extends {
key: string;
}>(files: T[]) => T[];
+ /**
+ * Map of file keys to errors.
+ */
+ uploadErrors: Map<string, string[]>;
+ /**
+ * Emits an event to the event emitter.
+ */
+ emitEvent: <T extends ThemeFSEventName>(eventName: T, payload: ThemeFSEventPayload<T>) => void;
}
/**
* Represents a theme on the file system.
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
WHY are these changes introduced?
To improve the developer experience by providing clear visual feedback when theme files fail to upload during development.
WHAT is this pull request doing?
theme dev
and file uploads fail. This includes pre-existing errors in theme assets, as well changes that occur after the server has been initialized.Note: I believe that the hot-reload doesn't work automatically for sections that aren't being rendered / displayed on the current page. We may want to change this to a full reload or something along those lines.
How to test your changes?
theme dev
with a themeMeasuring impact
Checklist