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

Replace GWTQuery with Elemental2 #13

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

zbynek
Copy link

@zbynek zbynek commented Aug 2, 2024

As discussed in Gitter, GWTQuery breaks navigation when certain Chrome extensions are active.
This should also reduce the code size a bit.

Closes #11 -- all the changes are included here to make Elemental work.

Most functionality stays the same, page title for hompage changed, which makes this conflicted with #1

Fixes #5
Fixes #4

pom.xml Outdated Show resolved Hide resolved
styleHomepage();
}
});
resizeHandler = Window.addResizeHandler(event -> styleHomepage());
Copy link
Contributor

Choose a reason for hiding this comment

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

(far) future cleanup - use elemental here too.

@zbynek
Copy link
Author

zbynek commented Aug 19, 2024

@niloc132 @tbroyer thanks for the feedback. Is there still something I should change in this PR?

Copy link
Contributor

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

Looks great to me, just some other thoughts here, but take or leave them at your own preference. I'll put up another build of the site on a different domain that uses this branch so we can give it some more testing, then merge?

mainTitle = subMenuItem.querySelector("a").textContent + " - " + selectedItem.textContent;
} else {
mainNavigationHref = Window.Location.getPath();
mainTitle = isOverviewPage(mainNavigationHref) ? "Overview" : "Project";
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a change in behavior? I'm not necessarily opposed, but it does make reviewing this giant rewrite a little trickier.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, since the GQuery selectors are NPE-safe I had to add the if (selectedItem != null) check and then it felt weird to replicate the buggy behavior in the else branch 🤷

This should be the only behavior change though.

@zbynek
Copy link
Author

zbynek commented Aug 22, 2024

I'll put up another build of the site on a different domain

Sounds good, thanks!

@zbynek
Copy link
Author

zbynek commented Aug 30, 2024

Preview at https://www.gwtproject.org.vertispan.com/ (also includes gwtproject/gwt-site#366 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants