fix(*): replace ApplicationTitle placeholder with the real app title#1603
fix(*): replace ApplicationTitle placeholder with the real app title#1603georgianastasov wants to merge 7 commits intomasterfrom
Conversation
…o ganastasov/fix-app-title-placeholder
There was a problem hiding this comment.
Pull request overview
This PR fixes app generation templates so the browser <title> is correctly populated with the generated application’s name, preventing the literal <%=ApplicationTitle%> placeholder from appearing in newly created apps across supported platforms.
Changes:
- Updated Angular (igx-templates) project
index.htmltemplates to use<%=name%>for the<title>. - Updated Angular project template config to set
ApplicationTitleto the resolvednamevalue. - Updated React/Web Components CLI project
index.htmltemplates to use the CLI delimiter$(name)in<title>.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/index.html | Use <%=name%> for generated Angular app <title>. |
| packages/igx-templates/igx-ts/projects/base/files/src/index.html | Replace <%=ApplicationTitle%> with <%=name%> in <title>. |
| packages/igx-templates/igx-ts/projects/_base/index.ts | Set ApplicationTitle to name in generated config. |
| packages/igx-templates/igx-ts/projects/_base/files/src/index.html | Use <%=name%> for generated Angular app <title>. |
| packages/igx-templates/igx-ts/projects/_base_with_home/files/src/index.html | Use <%=name%> for generated Angular app <title>. |
| packages/igx-templates/igx-ts-legacy/projects/side-nav-auth/files/src/index.html | Use <%=name%> for generated Angular app <title> (legacy). |
| packages/igx-templates/igx-ts-legacy/projects/base/files/src/index.html | Replace <%=ApplicationTitle%> with <%=name%> in <title> (legacy). |
| packages/igx-templates/igx-ts-legacy/projects/_base/index.ts | Set ApplicationTitle to name in generated config (legacy). |
| packages/igx-templates/igx-ts-legacy/projects/_base/files/src/index.html | Use <%=name%> for generated Angular app <title> (legacy). |
| packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/index.html | Use <%=name%> for generated Angular app <title> (legacy home base). |
| packages/cli/templates/webcomponents/igc-ts/projects/_base/files/index.html | Use $(name) for generated Web Components app <title>. |
| packages/cli/templates/react/igr-ts/projects/_base/files/index.html | Use $(name) for generated React app <title>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Changes unknown |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| igxPackage: NPM_ANGULAR, | ||
| yamlDefaultBranch: "<%=yaml-default-branch%>", // the placeholder will be evaluated by CodeGen | ||
| ApplicationTitle: "<%=ApplicationTitle%>" // the placeholder will be evaluated by CodeGen | ||
| ApplicationTitle: name // backward-compat variable; now uses the resolved name value |
There was a problem hiding this comment.
@georgianastasov Does codegen also need an update for this?
There was a problem hiding this comment.
I'm not sure actually maybe @dkalinovInfra will know better?
There was a problem hiding this comment.
I will need to check is codegen using this placeholder, but I think it will be better to not to change the placeholedr to something as generic as 'name'
There was a problem hiding this comment.
@dkalinovInfra @georgianastasov It's quite possible this placeholder (check the history & see #1237) is absolutely intentionally added like that and intentionally doesn't get replaced just for CodeGen consumption. In which case changing those at all might not be a good idea.
There was a problem hiding this comment.
Also possibly related to #1575, but the repo steps in #1603 don't explain what type is created, assuming the base which uses those. Alt solution would be to consider hiding the base from users and clearly marking it for internal use.
Mind you, those placeholders are not how this was supposed to be implemented to begin with IMO.
There was a problem hiding this comment.
So based on the discussion, it sounds like the <%=ApplicationTitle%> placeholder is intentional for CodeGen consumption and shouldn't be changed. The real fix should be hiding "Base Project" from the user-facing template list (as described in #1575, so users never encounter these pass-through placeholders. Should I close this PR and work on #1575 instead, or is there a different approach you'd prefer?
There was a problem hiding this comment.
@damyanpetev Yep, true.. I really did use the base template here, and I didn’t mention what application type gets created in the repo steps. I’ll fix the description now.
…o ganastasov/fix-app-title-placeholder
….com/IgniteUI/igniteui-cli into ganastasov/fix-app-title-placeholder
Closes #1579
Description
Fixed an issue where newly generated applications could keep the literal
<%=ApplicationTitle%>placeholder instead of using the actual application name.What was fixed:
Testing
build-pack/npm pack/ install the generated.tgzglobally / generate a new app and verify the title).@igniteui/angular-templates. Rebuild the repo, run the local CLI entrypoint, generate a new Angular app, and verify the title there.Verified that generated apps now show the provided app name instead of the placeholder.