Skip to content

#2817 - Main menu tiles collapse into the corner when no layout is declared for the matching screen size - #2818

Merged
01es merged 2 commits into
developfrom
Issue-#2917
Aug 25, 2026
Merged

#2817 - Main menu tiles collapse into the corner when no layout is declared for the matching screen size#2818
01es merged 2 commits into
developfrom
Issue-#2917

Conversation

@01es

@01es 01es commented Aug 20, 2026

Copy link
Copy Markdown
Member

Resolve #2817

To be completed by the pull request creator

This section should be completed with reference to section Preparing PR of the Code and PR reviews wiki page.

  • Create the pull request as a draft by tapping the dropdown arrow on the 'Create pull request' button under the pull request description (below the text box where this description is being edited) and changing the default Create pull request to Draft pull request.
    Or, if the pull request has already been created, convert it to draft by tapping the "Convert to draft" link beneath the "Reviewers" section.

  • A self-review of all changes has been completed, and the changes are in sync with the issue requirements.

  • Changes to the requirements have been reflected in the issue description.

  • Any "leftovers" such as sysouts, printing of stack traces, and any other "temporary" code, have been removed.

  • Developer documentation (e.g., comments, Javadoc), have been provided where required.

  • The correct base branch has been selected for these changes to be merged into.

  • The latest changes from the base branch have already been merged into this feature branch (and tested).

  • Added a change overview to the issue description or as a wiki page, referenced in the issue description.
    Some issues might be very descriptive and serve in place of a wiki page.
    In such cases consider adding label Wiki like to the issue.

  • This pull request does not contain significant changes, and at least one appropriate reviewer has been selected.

  • The In progress label has been removed from the issue.

  • The Pull request label has been added to the issue.

  • The pull request has been made ready for review by tapping the "Ready for review" button below the list of commits on the pull request page.

To be completed by the pull request reviewer

This section should be completed with reference to section Performing PR review of the Code and PR reviews wiki page.

  • The In progress label has been added to the pull request in GitHub.

  • The issue requirements have been read and understood (along with any relevant emails and/or Slack messages).

  • The correct base branch is specified, and that base branch is up-to-date in the local source.

  • The issue branch has been checked out locally, and had the base branch merged into it.

  • All automated tests pass successfully.

  • Ensure the implementation satisfies the functional requirements.

  • Ensure that code changes are secure and align with the established coding practices, including code formatting and naming conventions.

  • Ensure that code changes are documented and covered with automated tests as applicable.

  • Ensure that code changes are well-suited for informal reasoning.

  • Ensure that changes are documented for the end-user (a software engineer in the case of TG, or an application user in the case of TG-based applications).

  • If there are significant changes (described above), special attention has been paid to them.
    Marked the task items in section "Significant changes" as completed to indicate that corresponding changes have been reviewed, improved if necessary, and approved.

  • The issue or issues addressed by the pull request are associated with the relevant release milestone.

To be completed by the pull request reviewer once the changes have been reviewed and accepted

  • The changes have been merged into the base branch (unless there is a specific request not to do so, e.g., they are to be released to SIT).

  • The issue branch has been deleted (unless the changes have not been merged - see above, or there is a specific request not to do so).

  • The In progress label has been removed from the pull request.

  • The Pull request label has been removed from the issue.

@01es 01es changed the title #2917 - Main menu tiles collapse into the corner when no layout is declared for the matching screen size #2817 - Main menu tiles collapse into the corner when no layout is declared for the matching screen size Aug 24, 2026
1. LAYOUT_ORDER and layoutForScreen resolve the layout for the matched screen size, falling back to the nearest available one. The order mirrors tg-flex-layout: desktop to tablet to mobile, tablet to mobile to desktop, mobile to tablet to desktop.

2. A fallback is reported once per screen size, as layouts are re-resolved on every resize.

3. The per-screen and per-specification observers are consolidated into _screenChanged and _layoutSpecChanged, both delegating to _setAppropriateScreen. With fallbacks in place, a change to any specification can alter the applied layout, so the previous per-property guards no longer hold.

4. _screenMatched assigns all three screen flags together whenever a media query starts matching, and ignores queries that stop matching. Each iron-media-query delivers its own query-matches-changed event with its own observer flush, so during a rotation the outgoing screen size is still flagged as matching when the incoming one arrives. Assigning the flags together keeps them in agreement wherever an observer can read them.

5. Media queries in both tg-tile-layout and tg-flex-layout were built as max-width: N - 1 against min-width: N, which leaves fractional viewport widths -- produced by device pixel ratios and page zoom -- matching no query at all. Upper bounds are now N - 0.02. The change can only turn no-query-matches into one-query-matches, so it has no effect at any width that already matched.
@01es
01es requested a review from jhou-pro August 24, 2026 09:14
@01es
01es marked this pull request as ready for review August 24, 2026 09:15
@01es
01es merged commit e656bd5 into develop Aug 25, 2026
3 checks passed
@01es
01es deleted the Issue-#2917 branch August 25, 2026 05:12
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.

Main menu tiles collapse into the corner when no layout is declared for the matching screen size

1 participant