Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new layout for no data screen #21247

Merged
merged 41 commits into from
Sep 29, 2023
Merged

Implement new layout for no data screen #21247

merged 41 commits into from
Sep 29, 2023

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Sep 11, 2023

Description:

Implements the new layout for the no data screen.

I tried to refactor and optimize the code a bit more. The styling is unfortunately quite "local" as it's yet unknown if any of that stylings will be used globally at some point or not.

refs DEV-17149

Review

@sgiehl sgiehl force-pushed the nodatalayout branch 3 times, most recently from aadb60b to d67264a Compare September 15, 2023 13:54
Base automatically changed from refactornodatapage to 5.x-dev September 15, 2023 15:03
@sgiehl sgiehl force-pushed the nodatalayout branch 2 times, most recently from 5806a97 to 73972c4 Compare September 17, 2023 10:59
@sgiehl sgiehl force-pushed the nodatalayout branch 2 times, most recently from 1e4430f to c540167 Compare September 18, 2023 14:20
@sgiehl sgiehl force-pushed the nodatalayout branch 5 times, most recently from 730308e to 969327b Compare September 20, 2023 09:23
@sgiehl sgiehl added the Needs Review PRs that need a code review label Sep 20, 2023
@sgiehl sgiehl added this to the 5.0.0 milestone Sep 20, 2023
@sgiehl sgiehl marked this pull request as ready for review September 20, 2023 15:37
@sgiehl sgiehl requested a review from a team September 20, 2023 15:38
Copy link
Contributor

@bx80 bx80 left a comment

Choose a reason for hiding this comment

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

Looking really good, much nicer than the old tab layout 👍

I'm seeing some ugly wrapping with the button text:

image

This is with FireFox 102.10.0.esr, in Chromium 112.0.5615.138 there is no wrapping and the buttons look the same as the UI test screenshot, I haven't tested other browsers so it might just be a FireFox thing.

@sgiehl
Copy link
Member Author

sgiehl commented Sep 21, 2023

@Javi-Ormaechea @Stan-vw That might be something you need to decide. How should we handle the case, that the text is too long for the box? This can e.g. also happen for translations, as they might be a bit longer in some cases. We could either try to automatically resize the font so it matches the length. Or truncate the text to a certain length adding some dots in the end and add a tool-tip to the boxes showing the full title.

@caddoo caddoo self-assigned this Sep 21, 2023
@Stan-vw
Copy link
Contributor

Stan-vw commented Sep 22, 2023

@sgiehl your suggestions sound reasonable to me. One more thing I notice is with the SPA block: the text should probably be vertically centered, instead of lots of margin at the top and no margin at the bottom

@sgiehl
Copy link
Member Author

sgiehl commented Sep 22, 2023

I've updated the styling a bit so the boxes align the title in the middle. This now looks better in case the name is too long. But that will only work with two lines. For longer text the height of the box would automatically increase and the layout would partially break. But guess two lines should be enough for any translation

image

@sgiehl sgiehl force-pushed the nodatalayout branch 3 times, most recently from 872b8f3 to 1e27c75 Compare September 22, 2023 10:59
@mneudert mneudert self-assigned this Sep 28, 2023
Copy link
Member

@mneudert mneudert left a comment

Choose a reason for hiding this comment

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

LGTM for the stuff in this PR, but the TagManager needs more work.

For example on my local empty page I created a container without a published version. The information box below the container selection however only brought me back to the nodata page instead of the tag manager as I would have expected. Also, if there is no published container the steps 1 and 6 for the SPA/PWA (and React) are displayed empty.

With the layout discussion in matomo-org/tag-manager#691 going on it could perhaps be fixed altogether.

plugins/SitesManager/Controller.php Show resolved Hide resolved
@mneudert mneudert assigned sgiehl and unassigned mneudert Sep 28, 2023
@sgiehl
Copy link
Member Author

sgiehl commented Sep 28, 2023

@mneudert Regarding the TagManager issue. Did that work on the old new data page or is that a bug I've introduced here?

@mneudert
Copy link
Member

mneudert commented Sep 28, 2023

It was broken before, but for the SPA guide slightly different. Previously it displayed the container selection and then an empty point at position 2, now it is an empty point at position 1 with the container selection missing. It is not worse than before (the tag manager info link was also already broken) but the SPA should still show the container selection I guess?

@sgiehl
Copy link
Member Author

sgiehl commented Sep 28, 2023

Both parts a rendered within the TagManager, so indeed nothing to fix here. I don't know what the expected behavior for those cases actually would be. So this might be something that we should discuss with @snake14 or @AltamashShaikh

As that was sort of broken before, I would already merge the changes here and in the plugins. We can apply further fixes in TagManager at a later step.

@sgiehl sgiehl merged commit 407a43e into 5.x-dev Sep 29, 2023
18 of 20 checks passed
@sgiehl sgiehl deleted the nodatalayout branch September 29, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants