-
Notifications
You must be signed in to change notification settings - Fork 2.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
Re-factor admin UI into its own package and allow custom field types #2390
Conversation
b5cf860
to
8dd0869
Compare
Note to myself: #2088 |
dcceb71
to
ed2248e
Compare
Since the latest commit it is possible for application developers to add their own field types and custom React components for the admin UI. @JedWatson: Please review my pull request. I am aware, that this is a rather large and controversial restructuring. So if you feel, that certain parts are not acceptable or need more work before being accepted, please give me some pointers what should be changed or backed out. |
I like this! @JedWatson what do you think? Does it completely disrupt the 0.4 plans? :-) @geloescht, one comment I have is that I think it would be more desirable to put the keystone-admin project directly under keystonejs and add it as a dependency to keystone. |
@webteckie I also think keystone-admin should live outside keystone, just as keystone-utils does. However, I see no problem of keeping it as a bundled dependency until it is ready to be exposed and we are confident that no more files need to be moved between the modules. |
@geloescht if this breaks on windows it's a no-go for me. It must work on windows as keystone has been working just fine on windows. |
@geloescht I've been reviewing, it's large :) This is definitely going in the right direction and the prototyping is valuable. It's 100% something I was planning to do after 0.4 is launched, targeting 0.5 (or probably just jumping to 1.0) as the next version.
My biggest concern doing this now is it may reduce the speed of finalisation of 0.4 which I'm really hoping to get out this month. The big things are all done and we're writing unit tests right now, but while there's still potentially a lot of code being moved between keystone core, lists, fields and the Admin UI putting it in a separate repo and package may increase churn quite a bit. Worth noting that longer term I'm also hoping to spin most of the field types out into their own packages, and the |
@webteckie does this work on Windows? |
@webteckie The breaking on Windows is only temporary, until #2383 has a proper solution that works on Travis CI. The solution which is currently implemented here uses a symlink and git might therefore break it on Windows. @JedWatson I see. I like the idea of 0.4 being released soon, so I got no complains if this gets postponed until development on 0.5 starts. As long as there is no other big refactoring happening until then it should be comparatively easy to keep this PR up to date. |
I think this is my main issue with Keystone, custumization of the admin and the field types is the most important missing feature in keystone. Hope to see these features asap |
@kadosh1000 those are our two primary focuses to unblock with the next version. FWIW we have some projects going at Thinkmill that need these capabilities, which are part of funding the bulk of Keystone's development, so you can bet we're going to see them soon, and we're making rapid progress towards the next release. |
189b2f5
to
cca9f76
Compare
After a long and painful rebase, this PR is updated to the latest master. I skipped the changes that added the Another thing that came to my mind: (and was actually recently mentioned here: keystonejs/keystone#2824 (comment) ) |
Awesomee, thanks so much! Will have to think about your points about the bundling… /cc @JedWatson |
@geloescht I quickly tested this on windows and this is what I get when I start the e2e server with this PR:
Shouldn't the admin ui app be installed by default? |
And so I ran the command to install the admin ui app and still go the same thing:
|
@webteckie Thanks for trying! Something is weird there in your stack trace. There shouldn't be a file |
I followed the PR CLI instructions :-) |
@webteckie Uhm.... and those are? Sorry, I could be more familiar with github. Maybe I can help you on Gitter getting this thing set up (my Slack invite is still not working...). Browser testing is definitely something this PR could benefit from. |
@webteckie Your local master probably points to geloescht/keystone master, but it should point to keystonejs/keystone master. Please do |
@geloescht are you not working off a keystone fork? It seems like you are...btw, I think you got an invite to slack...can you please accept it, if so? we can keep discussing there. |
@JedWatson Any idea why |
@geloescht no, I haven't worked that out. It's driving me crazy 😠 |
86a2c1b
to
06f9f97
Compare
@JedWatson the issues with react-color seem to be fixed. Now, can we have npm v3 on Travis so bundled dependencies get their sub-dependencies installed? |
… should only include core field types.
…ing installed (re-throw exception if it is not MODULE_NOT_FOUND or about a different package than keystone-admin)
…l its dependencies
* bundled dependencies don't get their sub-dependencies installed on npm v2
@JedWatson Any idea when we'll get this merged in? |
Hi @geloescht, thank you for the massive effort in this pr! Unfortunately we can't see an easy path to getting this merged in, so we're going to close it for now. We're intending to ship this feature in the future, would you be interested in helping us out? Let us know if you're still interested. |
I started on a fork in which I am moving the Admin UI into it's own module. It is a work-in-progress, but already capable of running the server with and without the admin UI.
I propose to do this sooner, rather than later when a working plugin / package architecture is in place (in reference to #912 ). This way we can cut unnecessary ties one by one, until keystone is capable of auto-detecting the presence of the admin package. Until then, imho it's no worse to explicitly refer to a package named keystone-admin than it is to have it non-packaged within a sub-directory. What do you think?
Maybe the admin API should also be split off into it's own package, so it can be re-used globally.
Notes: