netlify-labs / netlify-cms-widget-parent Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
I'm gettin this error when I'm trying to initialize the widget manually in typescript:
Error: Element type is invalid: expected a string (for built-in components)
or a class/function (for composite components) but got: undefined.
You likely forgot to export your component from the file it's defined in,
or you might have mixed up default and named imports. Check the render method of `h`.
This is what I'm trying to do:
import { Control, Preview } from '@netlify/netlify-cms-widget-parent'
CMS.registerWidget('parent', Control, Preview)
// same story with
import * as NetlifyCmsWidgetParent from '@netlify/netlify-cms-widget-parent'
CMS.registerWidget('parent', NetlifyCmsWidgetParent.Control, NetlifyCmsWidgetParent.Preview)
Not sure if I'm doing anything wrong. The plugin works though by initializing using the script.
I'd help with this but I'm not sure where the problem is.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@babel/core
, @babel/preset-env
, @babel/preset-react
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
@commitlint/cli
, @commitlint/config-conventional
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
react
, react-dom
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
@emotion/core
, @emotion/styled
, babel-plugin-emotion
).github/workflows/release-please.yml
navikt/github-app-token-generator a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
GoogleCloudPlatform/release-please-action v3
.github/workflows/test.yml
actions/checkout v3
actions/setup-node v3
actions/cache v3
package.json
@emotion/core ^10.0.35
@emotion/styled ^10.0.27
netlify-cms-ui-default ^2.15.5
react ^16.8.4
react-dom ^16.8.4
react-select ^3.1.0
slugify ^1.5.0
@babel/core ^7.11.6
@babel/plugin-proposal-class-properties ^7.10.4
@babel/plugin-proposal-optional-chaining ^7.11.0
@babel/preset-env ^7.11.5
@babel/preset-react ^7.10.4
@commitlint/cli ^16.0.0
@commitlint/config-conventional ^16.0.0
babel-loader ^8.1.0
babel-plugin-emotion ^10.0.33
copy-webpack-plugin ^10.0.0
cross-env ^7.0.2
eslint ^8.0.0
eslint-config-prettier ^8.0.0
eslint-plugin-react ^7.20.3
html-webpack-plugin ^5.0.0
husky ^4.2.5
jest ^27.0.0
npm-run-all2 ^5.0.0
path-browserify ^1.0.1
prettier ^2.0.5
webpack ^5.11.0
webpack-cli ^4.2.0
webpack-dev-server ^3.11.0
Describe the bug
Clicking on the Parent widgets select box results in an error.
To Reproduce
Add a new entry for a collection and then try to change the desired parent by clicking the widgets instance, a select box.
Expected behavior
The select box should show a list with available folders to set as a parent for the entry we are creating. Possibly mimicking the tree structure you also have in the left navigation pane. And probably leaving out collections that have a setting for create: false
.
Applicable Versions:
[email protected]
proxy
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36
Currently we load entries during component mount.
That can be confusing when loading entries takes a while and can create some edge cases when users try to select an parent before everything was loaded.
Possible solution - switch to AsyncSelect
I was looking through the repo and saw this line that I thought would mean this widget only works for md
files. Tested it with json
files and it seems to work.
Not sure if there is something to be fixed here, but I wanted to bring this up in case this could cause problems down the road.
At the moment a string like conศinut
will be saved as con-inut
instead of continut
which is annoying when trying to do dynamic routing.
A package like slugify would help with this issue.
I'll try making a pull request with this change these days.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.