Skip to content

feat(fiori tools settings): app info page setting - #5031

Open
korotkovao wants to merge 11 commits into
mainfrom
feat/fiori-tools-settings/app-info-page-setting
Open

feat(fiori tools settings): app info page setting#5031
korotkovao wants to merge 11 commits into
mainfrom
feat/fiori-tools-settings/app-info-page-setting

Conversation

@korotkovao

@korotkovao korotkovao commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Adds support for a new VS Code setting ApplicationWizard.autoOpenApplicationInfoPage to control whether the Application Info Page automatically opens after project generation in the @sap-ux/fiori-tools-settings package.

The loadApplicationInfoFromSettings() function now accepts an optional getConfiguration parameter that allows callers to pass in the VS Code configuration accessor. When the setting is disabled (false), the Application Info Page will not auto-open, though the appInfo.json file will still be cleaned up. The change is fully backwards compatible — when getConfiguration is not provided, the behavior defaults to enabled (true).

Changes:

  • applicationInfoHandler.ts — Added optional getConfiguration parameter to loadApplicationInfoFromSettings() and a setting check before executing the open command
  • applicationInfoHandler.test.ts — Added test cases covering: setting disabled, setting enabled, missing getConfiguration, and getConfiguration returning undefined
  • .changeset/app-info-page-setting.md — Changeset entry for the minor version bump

Type of change

  • Bug (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a new feature)
  • Breaking change (Bug or New feature that would cause existing functionality/consumers to not work as expected)
  • Non-Breaking chores (Changes to tools, libraries, build process, documentation, etc)
  • None of the above (Reviewers might ask for more clarification)

How have you tested?

New unit tests added covering all relevant scenarios:

  • Setting disabled → command not executed, file deleted
  • Setting enabled → command executed, file deleted
  • No getConfiguration provided → defaults to enabled (command executed)
  • getConfiguration returns undefined → defaults to enabled via fallback

Checklist:

  • The code conforms to the general development principles

  • Supplied as many details as possible on this change

  • The code is easy to read and maintainable by others

  • Corresponding changes to the documentation has been done

  • Already existing and new unit tests pass locally

  • 🔄 Regenerate and Update Summary

PR Bot Information

Version: 1.29.18

  • Event Trigger: issue_comment.edited
  • Correlation ID: 7b085470-91ce-11f1-9ee6-84bac9b3216a

… Info Page auto-open

Add support for ApplicationWizard.autoOpenApplicationInfoPage setting
to control whether the Application Info Page opens automatically after
project generation.

Changes:
- Add getConfiguration parameter to loadApplicationInfoFromSettings()
- Check ApplicationWizard.autoOpenApplicationInfoPage setting (default: true)
- Only execute command if setting is enabled
- Backwards compatible: defaults to true if getConfiguration not provided

Related to yeoman-ui setting added in app-studio-toolkit.
Add comprehensive tests for the getConfiguration parameter:

- Test setting disabled (command should NOT execute)
- Test setting enabled (command should execute)
- Test default behavior when getConfiguration not provided (enabled)
- Test fallback when getConfiguration returns undefined (enabled)

All tests passing. Coverage: 100% statements, 93.33% branches.

Changeset: minor - new optional parameter for VS Code setting check.
@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 778c46d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@sap-ux/fiori-tools-settings Minor
@sap-ux/fiori-app-sub-generator Patch
@sap-ux/repo-app-import-sub-generator Patch
@sap-ux/ui5-library-sub-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset summary uses feat(fiori-tools-settings): instead of the required FEAT: prefix, which will cause pnpm validate:changesets to fail in CI. The source code and test changes themselves are clean, well-structured, and backwards-compatible. The author should fix the changeset prefix before merging.

PR Bot Information

Version: 1.29.18

  • Correlation ID: dc40a6e0-91c7-11f1-9795-622457bda4d2
  • LLM: anthropic--claude-4.6-sonnet
  • File Content Strategy: Full file content
  • Agent Instructions:
  • Event Trigger: pull_request.opened

Comment thread .changeset/app-info-page-setting.md Outdated
Co-authored-by: hyperspace-pr-bot[bot] <209611008+hyperspace-pr-bot[bot]@users.noreply.github.com>
@korotkovao korotkovao changed the title Feat/fiori tools settings/app info page setting feat(fiori tools settings): app info page setting Aug 6, 2026
Comment thread packages/fiori-tools-settings/src/applicationInfoHandler.ts Outdated
Comment thread packages/fiori-tools-settings/src/applicationInfoHandler.ts Outdated
Change function signature from callback-based getConfiguration to simple
autoOpen boolean parameter for better testability and clarity.

Before:
  getConfiguration?: () => { get<T>(...) }

After:
  autoOpen: boolean = true

Defaults to true for backward compatibility (maintains existing auto-open
behavior when parameter not provided).

Addresses PR review feedback from Iain O'Farrell.
Add writeApplicationInfoSettings as deprecated alias for addGeneratedFiles
to maintain backward compatibility with existing consumers.

Fixes build error in fiori-app-sub-generator and other packages that
import writeApplicationInfoSettings.
…eratedFiles

When appInfo.json doesn't exist, fs.readJSON returns undefined.
Added fallback to empty object with latestGeneratedFiles array
to prevent 'Cannot read properties of undefined' error.

Fixes test failures in repo-app-import-sub-generator.
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@korotkovao
korotkovao requested a review from IainSAP August 7, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants