Skip to content

Conversation

@JumpLink
Copy link
Owner

@JumpLink JumpLink commented Sep 18, 2025

Add adaptive Desktop View (1×3 layout) for Learn6502 GNOME app to fix #19

image

Summary

Introduce a new desktop-optimized view that shows:

  • Left: Learn tutorial
  • Center: Editor
  • Right: Game Console on top and Debugger below

The app adapts automatically between the existing mobile view (single stack) and the new desktop view based on window size. The floating main action button remains global and works in both layouts.

Why

  • Improve productivity on larger displays by reducing context switching
  • Keep the familiar, focused mobile experience on smaller screens

TODO

  • Give the game console focus when running so that keyboard controls work
  • Controls at the top instead of in the middle?
  • Automatically pause the game console when it loses focus (not just when the entire window loses focus)
  • Always show debugger

Add reusable PageStack (Adw.ViewStack wrapper) with programmatic pages
Replace inline stack in main.window.blp with $PageStack; keep global FAB
Bind bottom ViewSwitcherBar to PageStack in TS
Add LayoutMode/LayoutHost scaffolding (types)
Refactor MainWindow to use pageStack.stack; behavior unchanged
- main.window.blp: add `layoutHost` (single|three), breakpoints to auto-switch, single uses direct `Adw.ViewStack`
- main.window.ts: implement `mountSingleLayout`/`mountThreeColumnLayout`, safe reparent (`detachFromParent`), box clearing, bind switcher
- widgets: remove `PageStack` files and export
- fix: prevent gtk_box_append parent assertion by detaching before append
- Updated leftColumn to have hexpand set to false and vexpand set to true for better layout management.
- Modified rightColumn to set vexpand to true, enhancing vertical space utilization.
- Added adaptive layout settings for leftColumn and titleLabel visibility based on screen size.
- Implemented breakpoints to adjust the layout for different screen dimensions, improving user experience on various devices.
…ptability

- Changed width-request of leftColumn from a fixed value to -1, allowing for more flexible resizing based on the window size.
- Auto-switch via breakpoints; Paned position 360/600
- Mobile single-stack unchanged; remove fixed left width
…erties

- Deleted the layout.ts file to streamline type definitions.
- Removed unused properties related to layout from MainWindow, enhancing clarity and maintainability.
- Removed the responsive design breakpoint for single layout in main.window.blp.
- Updated MainWindow initialization to mount layouts based on the current breakpoint mode, enhancing layout adaptability.
- Cleaned up commented code related to key press handling for better readability.
- Added a debounced handler to manage focus changes, preventing immediate pauses on transient focus loss.
- Simplified the onFocusChanged method by delegating focus handling to the new debounced function, improving code clarity and responsiveness.
…y + breakpoints); wire buttons to win.* actions and keep FAB on mobile

- Introduced a new 'resume-symbolic' icon for the resume action in MainButton.
- Added a MenuButton widget with a context menu for assembly and simulation actions.
- Implemented a RunToolbar widget for quick access to run-related actions.
- Updated MainWindow layout to include visibility toggles for the new toolbar and buttons.
- Enhanced resource file to include the new resume icon.
…olbar

- Eliminated the resume button from the RunToolbar for a cleaner interface.
- Removed the "darken" style from the toolbar's style list, simplifying the design.
…sktop

- Remove template.desktop-mode and GObject property; infer mode from layoutHost
- Always refresh Debugger in desktop mode; keep ViewSwitcher only in mobile
- Skip stack navigation in desktop mode to avoid missing stack children
- Clean breakpoints/logs and unify comments (EN)
- Fix recursion and get_property runtime error
@JumpLink
Copy link
Owner Author

@mmartinortiz I am now very happy with the desktop view. I would be happy if you could test the current status :)

eu.jumplink.Learn6502.zip

@mmartinortiz
Copy link

mmartinortiz commented Sep 19, 2025 via email

- Debounce focus after run and suppress auto-pause (~400ms)
- Centralize pause toast in pauseGameConsole()
- Make Display focusable; add GameConsole.focus()
- Remove duplicate pause toasts from handlers
…ultiple languages

- Updated URLs in translation files to use the correct links for Western Design Center and Mouser.
- Improved phrasing in various translations to enhance clarity and consistency.
- Adjusted the pause message in the app to be more concise.
@mmartinortiz
Copy link

Hi @JumpLink,

It looks fantastic!. I really like the "Help" function at the bottom of the editor.

Have you consider to swap the positions of the "Help" and "Debugger" and group those on tabs? Let me sketch something quick (I tried both Cambalache and GIMP for making sketches, but I sill find easier Draw.io because it is the closest to pen and paper, my usual tools for sketching, I hope that my sketch it is still readable)

image

…atus page

- Remove “initial” `Adw.StatusPage` from `debugger.blp`
- Drop stack/state switching and `statusPage` references in `debugger.ts`
- Keep stepper and copy handlers intact; state sync remains for service
. Removed default example code from editor
@JumpLink
Copy link
Owner Author

Thank you, @mmartinortiz. I agree that the editor doesn't need that much space, and that it would be more practical if the debugger were easier to monitor. That's why I like your suggestion of using the space for the debugger.

Displaying the debugger information in a more compact form could also be implemented in the mobile view.

Regarding the help, I could see it being included in the Learn view, where you could switch between the tutorial, various quick help views, and sample programmes. This would work well in the mobile view too, where the Learn tab would always provide access to help information.

The current implementation simply repositioned the existing views — they are the same widgets as in the mobile view. I would like that the widgets work in both views. I think much of this could be implemented as suggested and would work in the mobile view as well. What do you think about us completing this implementation first and then pursuing your ideas in a later iteration Then we could release it faster. Is there anything else about the current implementation that bothers you? Otherwise, I would like to merge the pull request and would then start preparing a new release.

Your designs are fine as they are, also photos of handmade designs would be fine 🙂

One more thing: I noticed that your location on your GitHub profile is Amsterdam. Do you speak Dutch? I would like to use AI to generate Dutch translations and create a PR for them. Would you be willing to proofread them? I did the same thing with the German translation and then corrected it myself, and it worked surprisingly well.

@mmartinortiz
Copy link

What do you think about us completing this implementation first and then pursuing your ideas in a later iteration Then we could release it faster.

I agree, there is no need to make a single big release for the whole desktop. Repositioning the current widgets first, sounds like a very good first iteration.

Is there anything else about the current implementation that bothers you?

I would have never used the word "bother", there is nothing on this project that bothers me, on the contrary :-)

Your designs are fine as they are, also photos of handmade designs would be fine 🙂

When I used Glade, I think that it was more drag and drop, and then you just import the XML tree on the code. It seems that a lot has changed, I should get up to the new philosophy.

One more thing: I noticed that your location on your GitHub profile is Amsterdam. Do you speak Dutch? I would like to use AI to generate Dutch translations and create a PR for them. Would you be willing to proofread them? I did the same thing with the German translation and then corrected it myself, and it worked surprisingly well.

My location in the Netherlands, indeed, but my Dutch is not native. I would not trust myself with a translation :-). My native language is Spanish, and I'm very willing to proofread that translation. I'll ask around to some friends to see if they would like to do the Dutch proofreading.

@JumpLink
Copy link
Owner Author

I would have never used the word "bother", there is nothing on this project that bothers me, on the contrary :-)

I'm glad to hear that, thank you :)

When I used Glade, I think that it was more drag and drop, and then you just import the XML tree on the code. It seems that a lot has changed, I should get up to the new philosophy.

Even back in the Gtk3 days, the developers of Gtk actually advised against using Glade. This is probably similar to HTML, where everyone advises against using WYSIWYG editors.

In addition to the XML format, there is now a new format blueprint, which is also translated into XML format but is much easier to read and write. There is also a VSCode plugin for the blueprint format. After a little familiarisation, it works really well. I can also highly recommend Workbench, where there are many template examples that allow you to switch between Blueprint and XML and try out writing templates.

My location in the Netherlands, indeed, but my Dutch is not native. I would not trust myself with a translation :-). My native language is Spanish, and I'm very willing to proofread that translation. I'll ask around to some friends to see if they would like to do the Dutch proofreading.

Oh, Spanish is great too. I get the impression that there's also a lively Spanish retro computer scene. When I look at newly released NES games, for example, a lot of them come from France and the Netherlands, but also a few from Spain and Germany :)

I think AI-generated translations always depend on how widespread the language is and how much training data the AI has. English and German seem to work very well. When I once had something translated by AI into Portuguese, the result wasn't so good, but that may have changed in the meantime. I'll give it a try and you can let me know if it's usable or not :)

…pdates when disabled

- app-gnome: add “Enable Debugger” switch, bind sensitivity; remove initial StatusPage
- common-ui: add DebuggerState.DISABLED; no-op updates when disabled; auto-enable on step/stepper
- app-gnome: Run action disables stepper; stepper respects enabled state
- i18n(de): add “Disable to improve performance”, update “Enable Debugger”
- layout: adjust `rightTopBox` margin in `main.window.blp`
@mmartinortiz
Copy link

Even back in the Gtk3 days, the developers of Gtk actually advised against using Glade. This is probably similar to HTML, where everyone advises against using WYSIWYG editors.

And I can fully understand why, hahaha

In addition to the XML format, there is now a new format blueprint, which is also translated into XML format but is much easier to read and write. There is also a VSCode plugin for the blueprint format. After a little familiarisation, it works really well. I can also highly recommend Workbench, where there are many template examples that allow you to switch between Blueprint and XML and try out writing templates.

Looks like blueprint is very similar (in aim, at least) to QML. My days of development with UI ended some time ago (and when I need to do something, I pick up QT), and it is very interesting to me to see how it has changed. It is just a matter of recycling myself with the new technologies. Thank you very much for providing me with information and tools.

Oh, Spanish is great too. I get the impression that there's also a lively Spanish retro computer scene. When I look at newly released NES games, for example, a lot of them come from France and the Netherlands, but also a few from Spain and Germany :)

In Spain, the Spectrum ZX, Amstrad CPC, NES and Master System where the most popular systems during the 80s. I follow the Amstrad scene and it is quite active. Commodore, MSX or Apple ][ had a higher price entry.

I think AI-generated translations always depend on how widespread the language is and how much training data the AI has. English and German seem to work very well. When I once had something translated by AI into Portuguese, the result wasn't so good, but that may have changed in the meantime. I'll give it a try and you can let me know if it's usable or not :)

Sure! If you create a pull request, feel free to assign it to me and I'll check it as soon as I have time.

@JumpLink JumpLink merged commit 61f0dfa into main Sep 21, 2025
@JumpLink
Copy link
Owner Author

@mmartinortiz Feel free to create a new issue for your layout v2 draft :)

@JumpLink JumpLink deleted the feat/desktop-view branch September 21, 2025 12:03
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.

Feedback from a first time user

2 participants