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.77k stars 5.22k forks source link

Roadmap to React-Admin 3.0 #3194

Closed fzaninotto closed 4 years ago

fzaninotto commented 5 years ago

React-admin v2 is about one year old. We've kept backward compatibility for a year, but it means we can't yet use all the new shiny tools that our dependencies have shipped since then in major releases.

The objectives of the next release, v3, are to:

This will lead to a deep transformation of the library. We hope to minimize the breaking changes, but developers will have to follow a migration guide to use this new version with existing code. We'll try to make that as painless as possible.

We'll need help from volunteers to test the changes before releasing a stable version. We'll publish alpha and beta releases for that purpose.

We expect the 3.0 to be released sometime in the Summer of 2019. Development has already started and is visible on the next branch. We tag related pull request with the 3.0 milestone so you can track our progress.

Comments are welcome. Help migrating class components to functional components using hooks is also welcome (although we don't have the objective of migrating all the codebase to functional components for 3.0. This can happen later).

afilp commented 5 years ago

About switching to react-final-form, should we be worried about this statement there?

"If you need to mutate your data via dispatching Redux actions, you should probably use Redux Form." https://github.com/final-form/react-final-form#redux-example

smeng9 commented 5 years ago

@afilp Currently if we want to link two inputs, we are mutating data via dispatching Redux actions. This is the use case of using Redux Form. Not sure if there is any react-final-form equivalent to achieve this.

nik-lampe commented 5 years ago

See my comment in #3285

Maybe comments concerning the subject of switchting to react-final-form should be made there, to keep this thread here clear 🙌

mehrdad-shokri commented 5 years ago

Can someone on the team provide some information for us?
I'm starting a new admin dashboard and I wanna start my project on next version.
Is it stable enough to start my development based on next? (encountering some minor bugs is acceptable for me)
Can I use master branch in a project where I use material-ui version 4? Is it possible to create custom components with material-ui 4 and use it as a prop component for react-admin?

fzaninotto commented 5 years ago

@mehrdad-shokri We'll publish an alpha release when we consider the API is stable enough. Until then, we don't recommend that you use the next version.

We expect the 3.0 to be released sometime in the Summer of 2019.

mehrdad-shokri commented 5 years ago

@fzaninotto how about the second part of my question? Can you guide me on that too?

fzaninotto commented 5 years ago

No, master requires material-ui v1.

mehrdad-shokri commented 5 years ago

@fzaninotto so with your descriptions I'm blocked. My boilerplate is based on material-ui 4.
I can't use master version since it requires material-ui v1, and you don't recommend me to use next version.
What should I do?

fzaninotto commented 5 years ago

Sorry, I can't help you, please use stackoverflow for support.

mehrdad-shokri commented 5 years ago

It's not a technical question to ask on SO. My question was related to the roadmap of this project

aymendhaya commented 5 years ago

@mehdad-shokri you can by now use mui v3.x.x with the actual 2.x react-admin until the v3 is released. There is a hack published on the net on how you can do it.

fzaninotto commented 5 years ago

I've just published react-admin@3.0.0-alpha.0. Not yet ready for production, but if you're feelling adventurous, we need your feedback!

js-chris commented 5 years ago

Thank you very much. @fzaninotto!

I tried a fresh install, but got this error: ./node_modules/ra-core/esm/util/renderWithRedux.js Module not found: Can't resolve 'react-testing-library' in '/sites/react/react-admin-alpha/node_modules/ra-core/esm/util'

Do you know what is happening here?

fzaninotto commented 5 years ago

@js-chris that's a bug - see #3431

paaacman commented 5 years ago

Thanks for react-admin ! Do you know when you may release a stable version of React-Admin 3.0 ?

fzaninotto commented 5 years ago

@paaacman when it's done.

fzaninotto commented 5 years ago

I've just published react-admin 3.0.0-alpha.1. There should not be any more problems at installation.

https://github.com/marmelab/react-admin/releases/tag/v3.0.0-alpha.1

esistgut commented 5 years ago

Not sure if this is intentional but ra-language-french is stuck at version alpha.0.

fzaninotto commented 5 years ago

Yes, there was nothing new in this package so Lerna didn't republish it.

dgkm commented 5 years ago

@fzaninotto I tried the following and able to start the demo without any issues.

  1. git clone https://github.com/marmelab/react-admin.git react-admin-alpha
  2. cd react-admin-alpha
  3. yarn
  4. yarn build
  5. yarn build-demo
  6. yarn run-demo

Please confirm if I'm missing anything?

Because from an UI perspective I was unable to find out much difference in the demo app other than I felt bit slow to start with.

Also, please let me know if any particular test case to be tested in the demo app.

fzaninotto commented 5 years ago

@dgkm You've cloned the master branch, which is the 2.x branch. To install the 3.0, use npm and install react-admin@3.0.0-alpha.1.

As for the feedback we're waiting, more than regressions you may notice in the demo, we'd love to hear about difficulties you have when upgrading an existing app, or the usability of the new APIs (mostly hooks).

Concerning performance, we haven't done any profiling on the 3.0.0 branch yet, so it may be slower than the 2.x branch. We'll do an optimization pass before releasing the stable version.

dgkm commented 5 years ago

In fact I checked out the alpha.1 with git checkout v3.0.0-alpha.1 before I ran 3. yarn

Sure, I will try upgrading the existing project installing react-admin@3.0.0-alpha.1 using package installer and come back.

Between, do you any draft document or note about upgrade procedure or is it as simple as installing react-admin package?

dgkm commented 5 years ago

I'm getting the following error on startup after the upgrade without changing anything other than react-admin package:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of CoreAdmin.

at line this.setState({ dataProvider }); in the App.js (refer to the screenshot below)

Screen Shot 2019-07-25 at 6 13 41 AM

Any thoughts?

djhi commented 5 years ago

@dgkm There is an upgrade guide at the repository root. Try following it ?

nanoander commented 5 years ago

Hi, I'm asking here since it doesn't deserve its own issue. Is it possible to use React-Admin v3 with NextJs, or there's any incompatibility? Thanks.

pooriababaei commented 5 years ago

Hi. Please fix FileInput problem in version 2.9.4. it accepts nothing. There is already an issue for this problem.

djhi commented 5 years ago

I locked this issue as many people use it to ask unrelated questions or howto questions which should be asked on Stackoverflow. Please read the contributing guide.

fzaninotto commented 4 years ago

We've finally ticked all the boxes: react-admin v3 is out in beta. We'll now focus on fixing bugs and improving performance and documentation, and we hope to publish a stable v3 within a few weeks.

New features will have to wait until 3.1, and new breaking changes will have to wait until 4.0 (which is not even scheduled).

fzaninotto commented 4 years ago

React-admin v3 was released yesterday!