marmelab / react-admin

A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design
http://marmelab.com/react-admin
MIT License
24.99k stars 5.25k forks source link

4.0 Roadmap #5933

Closed fzaninotto closed 2 years ago

fzaninotto commented 3 years ago

We're starting to think about the next major milestone for react-admin. It'll mostly be a cleanup release, removing all the deprecated features and the compatibility layers we put in place. It should also be the occasion to use the latest major version of our dependencies.

Breaking Changes

These items didn't make it into the release:

We won't break BC for another year or two after 4.0, so we'd better wait to incorporate the new major releases of our dependencies. This causes the following releases to be blockers:

Timeline

Work on v4 started in September 2021, and is expected to end in early 2022.

Note: Please don't post comments with feature requests that don't need a breaking change here. React-admin releases new features on a monthly basis, and doesn't need a major release for that. This discussion is only for backwards-incompatible changes.

fzaninotto commented 2 years ago

We're doing our best to stabilize the API in January, so the first beta should be published in February

fzaninotto commented 2 years ago

I've removed cursor-based pagination from the roadmap, as I think this can bve added without breaking BC (cf #1510).

But we must support partial pagination, i.e. cases where computing the total is too expensive, and the response to getList doesn't contain it.

meastp commented 2 years ago

@fzaninotto The changes/bc-additions you propose (for pagination) would be sufficient, I think. Thanks :)

Romej commented 2 years ago

Will there be a path to upgrade from 2.9 to 4.0 or is it necessary to upgrade to 3.0 first ?

fzaninotto commented 2 years ago

@Romej We haven't planned to write an upgrade guide from 2 to 4. If you want one, I suggest you get in touch with Marmelab to buy some Professional Services.

CezaryTarnowski-TomTom commented 2 years ago

Hi, with the migration to 4.0 I've noticed that my app contains multiple nested views on entities that are dependent on other entities. A simple example would be groups and users that are parts of those groups, to attach a user to a group we're using route: /#/groups/:groupId/users/create for the list of users in the group we have: /#/groups/:groupId/users which we have defined as custom routes, it is working but it makes the groupUser resource handling substandard. I've started thinking that maybe it would be good to have an ability to nest tags so that on the react-admin level some entities can be considered as dependent on others. I'm wondering if you foresee such a use case, if this is something that you would like to be a part of v4 I could try to prepare a PR.

fzaninotto commented 2 years ago

@CezaryTarnowski-TomTom interesting use case, for which react-admin wasn't originally designed. But it should become more straightforward if you wrap your users page with a ResourceContextProvider.

As for your PR, could you elaborate on what you have in mind ?

CezaryTarnowski-TomTom commented 2 years ago

I would think about an ability to nest a users resource within groups:

<Resource name="groups">
   <Resource name="groupUsers" />
</Resource>

which would make the routes like: #/groups/:groupId/groupUsers/ - for list #/groups/:groupId/groupUsers/:id - for edit etc... that would also somehow set the groupId in the context of a groupUsers resource. I'm planning to deliver such a feature and I believe that it could be easier to create that within the library itself, I could also use some of your expertise.

fzaninotto commented 2 years ago

@CezaryTarnowski-TomTom nice idea. I don't think this requires a breaking change, so it's something we can add later. Your PR will be welcome!

WesleyKapow commented 2 years ago

Would love to be able to modify a resource's routes as I'd like /resource/:id to point to show and /resource/:id/edit to point to edit. I believe this aligns with many conventions like seen in rails. From a user perspective, they could copy and paste id's into the URL and that should go to the show page!

From the doc:

The routing will map the component as follows:

/posts/ maps to PostList /posts/create maps to PostCreate /posts/:id maps to PostEdit /posts/:id/show maps to PostShow

TCM5 commented 2 years ago

*offtopic alert . Just for curiosity, have you guys considered using zero-installs philosophy?

fzaninotto commented 2 years ago

*offtopic alert . Just for curiosity, have you guys considered using zero-installs philosophy?

I don't know what it is, can you please elaborate?

cuong-nguyen commented 2 years ago

Thank you all contributors and @fzaninotto on this v4. We're using v3 for one internal project and we're starting new one in few weeks. Is v4 beta production ready? or should I stick with v3 for now? If v4 is not ready, any specific timeline as to when it will be? Thanks 🙏

djhi commented 2 years ago

No it's not ready yet. We plan to release a beta very soon though

fzaninotto commented 2 years ago

I've removed this item from the list:

The rationale for not doing it in v4 is explained in the linked PR.

fzaninotto commented 2 years ago

I've removed this item from the list:

We're not ready for that and the tradeoff isn't clear - some might say that the trend goes the other way around.

fzaninotto commented 2 years ago

I've removed this item from the list:

After a few tests, I can't implement it. The mui Drawer component requires a fixed width for its main content.

So we'll fall back to the theme (with a custom theme property) that developers can tweak to adjust the menu width. Unforty-unately, this will require a bit of documentation.

fzaninotto commented 2 years ago

Great news: we've published the first beta release for v4: https://github.com/marmelab/react-admin/releases/tag/v4.0.0-beta.1.0

Please test and report bugs, and regressions as new GitHub issues!

fzaninotto commented 2 years ago

I'll speak about the changes and new features of react-admin v4 in about a week from now, during a 30 minutes online event. It's free, so feel free to join if you're curious about the future major release of react-admin!

https://www.eventbrite.com/e/preview-of-react-admin-v4-tickets-274058445187

giorgiPapava commented 2 years ago

Hey, thanks for this awesome tool for community. I'm wondering when v4 will be production ready and available on NPM. I will be starting new project in around 1 month and I don't think it would be good idea to start with v3. What would be needed to migrate from v3 to v4? Will there be migration guide?

djhi commented 2 years ago

Hi,

We released several beta already. As for the upgrade guide, it's here and the documentation is here

giorgiPapava commented 2 years ago

@djhi Thanks 🥰 Is is planned when you will be releasing production ready version? Also is it safe to start implementing beta version? Will there be breaking changes from beta to production?

fzaninotto commented 2 years ago

We've announced a public release of react-admin v4 in April. As for the beta, we're following semver, so there should not be any more breaking changes since the stable release.

TCM5 commented 2 years ago

Ohhh, I missed the V4 preview event at preview-of-react-admin-v4.

Can this be published on youtube or something else?

fzaninotto commented 2 years ago

We didn't record the presentation. But we'll soon publish a blog post with essentially the same content.

DVGY commented 2 years ago

@fzaninotto I saw just now that, your team will also remove redux. In our app, we are using custom reducers and our own state in the whole app to manage some data.

Can you pls answer these 2 questions taking into consideration the redux thing?

  1. How hard will it be to upgrade our app to react admin v 4.0.0?
  2. What are the things that we may need to change?
fzaninotto commented 2 years ago

@DVGY We've written an extensive Upgrade guide, it contains all the anwsers you need.

https://github.com/marmelab/react-admin/blob/next/UPGRADE.md#redux-is-gone

fzaninotto commented 2 years ago

We've published react-admin v4 today!

https://github.com/marmelab/react-admin/releases/tag/v4.0.0