-
Notifications
You must be signed in to change notification settings - Fork 141
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
Rework app info to use components #5170
base: main
Are you sure you want to change the base?
Conversation
76e766a
to
e4cc408
Compare
1. Add a default relative path (otherwise relativePath returns a blank string) 2. Move roles to a separate line item
e4cc408
to
8144601
Compare
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1998 tests passing in 904 suites. Report generated by 🧪jest coverage report action from 413f784 |
We removed the upgrade reminders in #4310 but we missed deleting the tests!
3bf58a5
to
2d18f38
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't speak to the introduction of a new component but this is such a massive improvement for apps – thank you!
this.tableSection( | ||
'Current app configuration', | ||
[ | ||
['Configuration file', {filePath: basename(this.app.configuration.path) || configurationFileNames.app}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very surprising! It's supposed to be italicized, I wonder what your settings are such that colors are inverted instead.
3970ccc
to
413f784
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 declarationspackages/cli-kit/dist/private/node/ui/components/TabularData.d.tsimport { InlineToken } from './TokenizedText.js';
import { FunctionComponent } from 'react';
export interface TabularDataProps {
tabularData: InlineToken[][];
firstColumnSubdued?: boolean;
}
declare const TabularData: FunctionComponent<TabularDataProps>;
export { TabularData };
Existing type declarationspackages/cli-kit/dist/private/node/ui/components/Alert.d.ts@@ -1,9 +1,10 @@
import { BannerType } from './Banner.js';
import { BoldToken, InlineToken, LinkToken, TokenItem } from './TokenizedText.js';
+import { TabularDataProps } from './TabularData.js';
import { FunctionComponent } from 'react';
export interface CustomSection {
title?: string;
- body: TokenItem;
+ body: TabularDataProps | TokenItem;
}
export interface AlertProps {
type: Exclude<BannerType, 'external_error'>;
|
WHY are these changes introduced?
web
section for extension-only apps.WHAT is this pull request doing?
Instead of the mess of string generation, we reorganize the code to generate headers and data tables, then do the actual rendering in UI kit.
To make this work nicely, I added a new
TabularData
concept to UI kit, which does seem useful in general. It even has a parameter to dim the leftmost column, which I think creates a pleasant effect.App with many extensions, before:
And after:
Extension-only app, before:
And after:
App with many errors, before:
And after:
How to test your changes?
Run
shopify app info
on various apps.Measuring impact
How do we know this change was effective? Please choose one:
Checklist