-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Explicitly unpack List config items from adminMeta #2892
Conversation
It looks like we could use some more details. Good titles and descriptions help us fix things faster. If you can provide more information please update this issue. |
🦋 Changeset is good to goLatest commit: 22d49fd We got this. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 prefer this also
Object.entries(lists || {}).forEach( | ||
([key, { access, adminConfig, adminDoc, fields, gqlNames, label, path, plural, singular }]) => { | ||
const list = new List( | ||
{ access, adminConfig, adminDoc, fields, gqlNames, key, label, path, plural, singular }, | ||
adminMeta, | ||
views[key] | ||
); | ||
listsByKey[key] = list; | ||
listsByPath[list.path] = list; | ||
} | ||
); |
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.
Not sure I follow why this expansion. In this specific case I found it harder to reason about. ...not that I mind much.
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.
The idea here is to make it explicit about what things we're taking out of the adminMeta
object and where we're sending them. Once all of this is complete I want to know precisely how we're using the adminMeta
object. The reason this is so important is that it's particularly wacky the way this thing gets passed across to the client via webpack, so it helps to have it all laid out what we're doing with it, rather than having the whole object being shipped off to other parts of the code base.
d7bf325
to
22d49fd
Compare
No description provided.