Skip to content

#2278: Split main-view.fxml into separate layout components - #2297

Open
krystynaShatkovska wants to merge 7 commits into
devonfw:mainfrom
krystynaShatkovska:feature/issue-2278
Open

#2278: Split main-view.fxml into separate layout components#2297
krystynaShatkovska wants to merge 7 commits into
devonfw:mainfrom
krystynaShatkovska:feature/issue-2278

Conversation

@krystynaShatkovska

@krystynaShatkovska krystynaShatkovska commented Aug 10, 2026

Copy link
Copy Markdown

This PR fixes #2278

Implemented changes:

Split main-view.fxml (~300 lines) into three FXML files using fx:include tags:

  • navigation.fxml — left sidebar (logo + project/workspace/language selectors)
  • status-bar.fxml — bottom status bar (label + progress bar)
  • main-view.fxml — shell that includes the two components via fx:include, keeping the center IDE rows inline (their onAction handlers require the parent's controller)

Controller integration:

  • App.java / AppBaseTest.java: Replaced setController() with setControllerFactory(type -> controller) so child FXMLs with fx:controller share the same MainController instance
  • MainController.java: Added idempotent guard to initialize() so it runs only once across all FXML files

All fx:id references and onAction handlers preserved and verified.

Testing instructions

Build the project with mvn clean test and verify all tests pass
Launch the IDEasy GUI and confirm the main window renders correctly with all three regions (sidebar, center IDE rows, bottom status bar)
Interact with each region to verify functionality is unchanged:

  • Open a project and workspace via the sidebar selectors
  • Click "Open" buttons for each IDE row
  • Trigger a status update in the bottom bar to confirm the label/progress bar work

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. Bump jackson.version from 2.18.0 to 2.18.2 #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Aug 10, 2026
@krystynaShatkovska krystynaShatkovska added enhancement New feature or request GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx labels Aug 10, 2026
@krystynaShatkovska krystynaShatkovska self-assigned this Aug 10, 2026
@krystynaShatkovska krystynaShatkovska moved this from 🆕 New to Team Review in IDEasy board Aug 10, 2026
@krystynaShatkovska krystynaShatkovska moved this from Team Review to 🏗 In progress in IDEasy board Aug 10, 2026
- Remove setController() to avoid conflict with fx:controller in FXML
- Add initialized flag to MainController.initialize() to run only once
  across all 3 FXML files (main-view, navigation, status-bar)
- All 56 GUI tests pass

Co-Authored-By: Capgemini Sovereign AI Platform
@coveralls

coveralls commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 31468725246

Coverage increased (+0.007%) to 72.888%

Details

  • Coverage increased (+0.007%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 34 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

34 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/ide/gui/MainController.java 30 67.21%
com/devonfw/ide/gui/App.java 4 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 17549
Covered Lines: 13341
Line Coverage: 76.02%
Relevant Branches: 7757
Covered Branches: 5104
Branch Coverage: 65.8%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@laim2003 laim2003 moved this from 🏗 In progress to Team Review in IDEasy board Aug 10, 2026
@laim2003
laim2003 self-requested a review August 10, 2026 13:44

@laim2003 laim2003 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.

Thanks for your PR! Looks good! Sadly I hoped that JavaFX allows for an easier way to fragment layouts without having to add extra checks, but it seems like JavaFX is not very flexible. From what I could research, using a controller factory seems to be the most common way to implement this. Maybe we should rethink the way we will fragment the UI in the future. For now this is good in my opinion.

Comment thread CHANGELOG.adoc
@laim2003 laim2003 moved this from Team Review to 👀 In review in IDEasy board Aug 10, 2026
@laim2003 laim2003 added the internal Nothing to be added to CHANGELOG, only internal story label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx internal Nothing to be added to CHANGELOG, only internal story

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Restructure main-view.fxml into seperate layout files

3 participants