-
-
Notifications
You must be signed in to change notification settings - Fork 724
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
Move add-on registry in its own package #4949
Conversation
…problems if a `.ts` file is found anywhere in the build Checkpoint
…nstead only for `.js` files. Delete test files
… excluded from the build
…toryBook stories
* master: (22 commits) Release changelog notes for 16.20.1 Release 17.0.0-alpha.5 Generate a split sitemap (also fix robots.txt) (#4639) Fix search block in edit mode re-queries multiple blocks with an empty search text (#4694) Fix Move to top of folder ordering in folder content view (#4691) Changelog Revert "Add current page parameter to the route in the listing and search block pagination (#4159)" (#4695) Release generate-volto 7.0.0-alpha.4 Force the resolution of the `react-error-overlay` package to `6.0.9` (#4687) Fix training links (#4635) Release 17.0.0-alpha.4 Release changelog notes for 16.20.0 (#4684) Update to latest backend versions (#4682) Support RelationList field with StaticCatalogVocabulary and SelectWidget. (#4614) Load a theme via a `theme` key in `volto.config.js` or in `package.json` (#4625) docs: improve creating view documentation (#4636) fix sitemap.xml.gz is not compressed #4622 (v2) (#4663) Make URL a literal string to fix broken link (#4667) Move developer guidelines to contributing #4665 (#4666) Update Volto contributing to align with and refer to the new Plone co… (#4634) ...
* master: (29 commits) Remove max_line_length from .editorconfig (#4776) Fix bug showing logs at the browsers when richtext widget is use (#4780) Show expired and future content in contents view (#4764) Fix reducing expanders loaded in a subrequest (#4761) Update release notes for 16.20.5 and 16.20.6 (#4759) Release 17.0.0-alpha.7 Try to sort out volto's use of language codes (#4741) Improve .npmignore to not include not needed files/folders (#4746) Release 17.0.0-alpha.6 Control panel list SSR (#3749) Open all accordion'd content in InlineForm by default, allow arbitrarily close any number of them (#4178) Upgrade to Plone 6.0.4 (#4743) fix: unresponsive add page (#4507) Apply suggestion from browser for password field (#4524) (fix):Object.normaliseMail: Cannot read properties of null (#4558) Fix link in Volto, remove from linkcheck ignore in Documentation v6.0 (#4742) added documentation regarding the static middleware #4518 (#4736) Closes issue #4567 (#4570) Fix whitespace in locales created by the generator (#4737) Tidy up from synch with 16.x.x (#4728) ...
Co-authored-by: Victor Fernandez de Alba <sneridagh@gmail.com>
* master: Release changelog for 16.20.7 (#4816) Release 17.0.0-alpha.8 Add supported languages (#4811) Fix html tag lang attribute in SSR (#4803) Finnish translation forwardport (#4084) (#4810) Control panel for relations (#3382) Add guard in case of malformed blocks are present (at least id and title should be present) (#4802) fixed the issue #4660 - shouldn't use a hook like function name for a variable (#4693) Fix HMR of @plone/volto (#4799)
* master: (29 commits) Remove anonymous function calls. Remove default exports from. (#4917) Release 17.0.0-alpha.14 Linked headlines (#3540) Release notes for 16.20.8 16.21.0 16.21.1 (#4910) Spanish translation (#4896) Refactor Anontools (#4845) Update to plone-backend 6.0.5 (#4897) Release 17.0.0-alpha.13 Enforce max upload size (#4868) Fix and improve the `addStyling` helper (#4880) Release 17.0.0-alpha.12 Fix regression in horizontal scroll in contents view, add it back (#4872) Configurable Container component from registry for some key route views. (#4871) Allow to deselect color in ColorPickerWidget. (#4839) Release 17.0.0-alpha.11 Pagination with router params (#4698) Release 17.0.0-alpha.10 feat(slate): Add css identifier to slate style menu options (#4847) Update Brazilian Portuguese translations (Fixes #4853) Convert header class to function (#4767) ...
* master: Add a marker in the props for `RenderBlocks` in case that we have a container (#4932) Update the 'version addded' information regarding the Grid block in docs Release 17.0.0-alpha.16 Grid block in core + primitive Container block (#3180) Release 17.0.0-alpha.15 Fix changelog message and docs for #4848 (#4927) Add Storybook story for useDetectClickOutside hook with several demos (#4923) Fix the experimental add new block button position, compensate the ic… (#4924) Use proper heading tag (depending on the headline) in default listing template (#4848) Fix Annontools storyBook (#4921)
…erated addons-loader.js
✅ Deploy Preview for volto canceled.
|
Passing run #7187 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
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.
@sneridagh What is the benefit of moving it? Won't it potentially cause issues with hoisting?
@davisagli World domination! ;) This will allow us to use the add-on registry somewhere else outside Volto. I'm experimenting with adding it to a NextJS build. I have a PoC already working :) It's quite promising. |
* master: (31 commits) Refactor Content Rename Model (#4971) Refactor Content Tags Modal (#4970) Refactor Content workflow Modal (#4969) Refactor Content Property Model (#4968) Refactor Sidebar (#4965) Refactor PersonalTool component (#4954) Fix standalone navigation action call if expander is set (#5197) Fix api convenience buildout build Fix instruction to fetch add-on from repo (#5196) Remove JSON files from being linted by ESlint, since it's not its pur… (#5194) Release generate-volto 7.0.0-alpha.8 Add missing empty lock to acceptance generator addon folder (#5193) Release generate-volto 7.0.0-alpha.7 Release 17.0.0-alpha.27 TypeScript support in core (#4662) Update delete content modal for link integrity (#4786) Add external className to slate Link view. (#5188) Release generate-volto 7.0.0-alpha.6 Fix addon i18n local command when executed outside the scope of a Volto project. (#5181) Release 17.0.0-alpha.26 ...
I`m going to test this branch with my mtoepfl-typescript branch. In which I try to "merge" my work from last year sprint in Namur, where I type some basics like src/helpers/index.ts and first blocks like Title and Listing. I put the types in extra .d.ts files where possible, so the "confusion" for none-typescript developers is minimal. Also if they shadow core-blocks and they are able to inherit from this types easily and extend it. I`m looking forward for your feedback and to discuss this changes in person soon! |
* main: (36 commits) Fix master-> main renaming in tests and docs (#5251) Release generate-volto 7.0.1 Move the news item to the right place Update to latest volto-testing in generator (#5248) Release @plone/volto-testing 4.0.0 Release generate-volto 7.0.0 Update generators to final Volto 17 (#5247) Sync proper 17.0.0 release notes including all notes for the final release. Release 17.0.0 Update npmignore to ignore .yarn folder Release generate-volto 7.0.0-alpha.12 Update Plone and Volto versions in generators (#5246) Release generate-volto 7.0.0-alpha.11 Fix parser in addon generator boilerplate (#5243) mention ipn website (#5241) Release 17.0.0-alpha.30 Upgrade to latest release-it Fix dependency problem, 'moment-locales-webpack-plugin' can't be in devDeps, since Razzle needs it in the projects. (#5236) Release 17.0.0-alpha.28 Release generate-volto 7.0.0-alpha.10 ...
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 did a first review. Sorry for being nitpicking, but as I understood you asked me for feedback especially on typings.
As said, I will test it out. But in my opinion this type of utility can show the benifits of strong typing very well.
packages/registry/src/types/index.ts
Outdated
export type AddonReducersConfig = {}; | ||
export type AddonRoutesConfig = {}; | ||
export type SlotsConfig = {}; | ||
|
||
export type ComponentsConfig = { |
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.
FYI you can write this more readable as:
export type ComponentsConfig = Record<string, { component: React.ComponentType }>;
As far as I know, the used syntax is prefered if you extend this types with other attributes, eg.:
export type ComponentsConfig = {
[key: string]: { component: React.ComponentType };
name2: { component: Function; };
name3: { component: string; };
};
/** | ||
* The group of the block | ||
*/ | ||
blockSchema?: ({ props, intl }: { props: unknown; intl: unknown }) => object; |
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.
Another readability thingy, not needed twice:
blockSchema?: ({ props, intl }: { props: unknown; intl: unknown }) => object;
blockSchema?: (payload: { props: unknown; intl: unknown }) => object;
also Record<string, unkown>
instead of object
seams more explicit to me in this cases.
* main: (38 commits) A11y - Updated aria-labels for landmarks, added landmark for sidebar and plug skiplinks (#5290) (FIX): put padding so the text is not clipped (#5305) Add upgrade docs for users of `@kitconcept/volto-blocks-grid` addon (#5333) Add new multilingual acceptance tests with Seamless mode enabled (#5332) Fix reference to installation (#5328) Fix compare translations view (#5327) Release 17.2.0 Fix to return correct results when loading the search block from a URL (#5298) Allow multiple path criteria (#5317) Release 17.1.1 Added guard in `flattenScales` in edge case image is undefined (#5318) Normalize the shape of the image component `item` prop if it contains the serialized object after creation to match the one in the catalog. (#5266) Release 17.1.0 move the function to get the lead image sizes to the block configuration (#5289) Removed default aspect-ratio from Image component (#5278) Added support for `blocksConfig` configuration in the listing block (#5310) fix: logo and login storybook (#5286) Refactor Logo component to improve the conditional link to the root (#5280) Fix hierarchy of readme headings Clean up readme and install docs (#5287) ...
@mtoepfl I added your suggestions. I also updated the latest updates from @stevepiercy I've added a README here, based on other docs that we have and I made it "agnostic" not tied to Volto necessarily. Please take a look and sorry in advance, I did it quickly and might have lots of inconsistencies. I might have another look tomorrow. I would like to have this excerpt in here because I want the package to be self-explaining (eg. someone that comes out of the blue and must understand the capabilities of this package, being comprehensive enough for someone alien to Volto is paramount). |
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.
Mostly English grammar and syntax, a few one sentence per line style things, and a few questions.
packages/registry/package.json
Outdated
"maintainers": [ | ||
{ | ||
"name": "Plone Foundation", | ||
"email": "plone-developers@lists.sourceforge.net", |
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 list is unused. What is the source? That should be fixed, too.
https://sourceforge.net/p/plone/mailman/plone-developers/
"email": "plone-developers@lists.sourceforge.net", |
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 saw this one in a lot of packages. Maybe we should bring it to the steering circle.
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.
Added to the agenda: https://docs.google.com/document/d/1Iafw7MuTnG3l1j3fB1TbMgtADlhJGclSk7S8K0tTXeA/edit. If possible, can a merge be delayed until after the next meeting on Thu, Nov 2?
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 visited Alpha Centauri to the planning department, rappelled to the cellar with a headlamp, into the disused lavatory, pried opened the stuck file cabinet, fought off the leopard to view the display, then filed a complaint.
This one was overlooked, but it should not block merging. Instead I can open a new issue until we can bring it to the steering committee or we can make an executive decision for what should be the effective email address, if any.
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
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.
A couple more fixes, and it should be good to go. I also pushed up a few more words to ignore when running Vale for spell check.
Co-authored-by: Steve Piercy <web@stevepiercy.com>
* main: Add support for TS files in add-on registry shadowing system (#5354) Fix Sphinx toctree warnings from included CHANGELOG.md (#5135) Remove regex from sphinx-copybutton config, now that linenos are excl… (#5346) Release 17.3.0 Fix DatetimeWidget on FF, the button default if no type is set is sen… (#5343) Call applyBlockDefaults from addBlock/insertBlock, add initialValue() configuration option for blocks (#5320)
* main: Add types definitions for Volto (#5355)
― Douglas Adams, The Hitchhiker's Guide to the Galaxy Quoting master Adams, as nobody filled any complain :) I'm about to merge this one, starting the 18 alpha phase, continuing with our plans for world domination. /cc @plone/volto-team |
This builds upon the typescript-support-in-core branch.
It moves the Volto add-on registry to its own package
@plone/registry
. It will allow to have the feature portable to other frameworks other than Volto itself. Internally, Volto uses it by path, so it does not relies on a released version.It uses TypeScript, and an initial typing of the registry is in place already.
It also features the same treatment for the
@plone/scripts
use ofi18n
script.