Closed mcrumm closed 3 months ago
@josevalim ready for another look!
Why remove modal
from corecomponents? Just because it's not used in the generators doesn't mean it's not useful elsewhere, e.g. to include it in one of my own liveviews/components.
The rule has always been to ship with the components used by the generators, otherwise we could easily argue that core components should be a 1000LOC file with accordions, stats bars, breadcrumbs, etc. People can always add the features they need.
I would also add that the complexity/size of CoreComponents and the complexity of the generated LiveView pages with LiveComponents and more, have often been cited by newcomers as a challenge for getting started, because it felt too daunting.
At the beginning, we used those generators to showcase LiveView features. The goal with these changes is to align this with the phx.gen.html generators and make them more about providing the simplest foundation for people to build on.
Ah okay, that's totally fair. Thanks for the reply!
Great work, Michael! This will definitely help folks new to Phoenix. Can't wait to have it in an official release! 😀
Simplifies the
phx.gen.live
generator with the following changes:/new
and/:id/edit
routes.:id/show/edit
route. FormLive accepts a?return_to=index|show
param to negotiate live navigation after successful form submit.<.modal>
component and its helper functions as they are no longer used.