Giter Site home page Giter Site logo

Comments (5)

damyanpetev avatar damyanpetev commented on May 28, 2024 2

NgModules (legacy) should be descriptive enough. I don't like non-standalone.

Names were for illustrative purposes / not final obviously, so really don't mind changing them :)
I take it by the replies, the actual suggested approach is acceptable then.

from igniteui-cli.

ChronosSF avatar ChronosSF commented on May 28, 2024 1

I'd say non-standalone sounds a bit weird, let's go for using modules

from igniteui-cli.

damyanpetev avatar damyanpetev commented on May 28, 2024

I see in #1174 the current approach is to try to internally split the Ignite UI for Angular project and add an additional prompt for standalone and the --standalone flag; While that moves towards a more familiar experience with an option it also requires a bit of extra effort internally since the actual view templates and projects are nothing alike.

Alternative suggestion:
Instead of going for the parity, we could instead plug into the existing setup in the CLI already and define the new standalone setup as a separate project type. That will inheritably plug into the existing prompts here I think:
image
And I can see this becoming:

> Ignite UI for Angular
-------------------------
Ignite UI for Angular (non-standalone, legacy)
-------------------------
Ignite UI Angular Wrappers

Where the default is obviously standalone, which can be also reflected in the text if we choose to. For calling the new command directly outside of Step by step mode, the differentiation will be based on passing a different project --type argument.

To that end, in addition I'll suggest we keep the default igx-ts type and update/replace it to standalone if possible and assign the existing ones to something like igx-ts-legacy (NNF). That means the

<cli/schematic> new <name> --framework=angular [--type=igx-ts] --template=side-nav

Produces the new Standalone Components setup and is the default option, while:

<cli/schematic> new <name> --framework=angular --type=igx-ts-legacy --template=side-nav

will produce the legacy project with NgModule-s.

One last addition - we can and probably should add a migration for existing igx-ts project to prompt users if when updating. Something in the lines of:

> We've updated our view templates to use Standalone Components. Those are compatible with your project and you can start using them now or remain with `NgModule` dependencies.
Would you like to continue with Standalone Components for new views? (Y / n) N

> We've updated your project type to `igx-ts-legacy` to continue using `NgModule`-s. You can always change back to `igx-ts` should you want to start using Standalone Components.

We've checked with @jackofdiamond5 and adding a new standalone view to an existing project works just fine, so not exactly even breaking and we can allow existing projects to use the new templates if they would like to. Minor caveat about versioning can be a limitation with this since schematics follow the library version, depending on how we version it and if users ignore package locks and ng update they could jump to the new functionality without notice. But again, not entirely breaking.

This will allow us to reuse more or less existing logic for multiple project types in Step by step, commands and should plug in essentially the same way for @igniteui/angular-schematics.
Only one slight concern (that might've been already present with the current effort anyway) is reducing the amount of duplicate files we need to maintain, since project templates are not setup to share/inherit between separate project types. IIRC project templates are more/less file system based, so it should still be possible to share some basic files across the board (package.json, angular.json) so we don't have to update multiple copies of those.

//CC @Lipata @ChronosSF

from igniteui-cli.

Lipata avatar Lipata commented on May 28, 2024

@damyanpetev we will think about how we can do the change internally so that maintenance is easier and not error-prone. @kdinev what are your thoughts on the way it will be presented in the wizard and the flag used in the console?

from igniteui-cli.

kdinev avatar kdinev commented on May 28, 2024

NgModules (legacy) should be descriptive enough. I don't like non-standalone.

from igniteui-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.