8000 Use the native New Tab by default by felipeerias · Pull Request #1830 · Igalia/wolvic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use the native New Tab by default #1830

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

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

Conversation

felipeerias
Copy link
Collaborator

Use the native New Tab by default. Also clean up some bugs when setting the homepage in the Settings.

@felipeerias felipeerias force-pushed the felipeerias/newTabByDefault branch from 02de6b4 to 12f76b6 Compare April 26, 2025 12:44
@felipeerias felipeerias marked this pull request as ready for review April 26, 2025 12:44
@felipeerias
Copy link
Collaborator Author

This PR is also related to #1835 and #1836

setHomepageValue(UrlUtils.ABOUT_NEWTAB);
} else if (checkedId == CHOICE_HOMEPAGE_URL) {
setHomepageValue(mDefaultHomepageUrl);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a fallback in case none of the conditional clauses is satisfied ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so, the value comes from a group of three radio buttons so it can only take the values 0, 1, and 2.

Copy link
Member

Choose a reason for hiding this comment

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

Then perhaps it'd be clearer to use a switch and an assert to ensure no mismatch is possible.

@javifernandez
Copy link
Member

Umm, there are a few regressions in this change:

1- The first time you select "other", the about:newTab appears as hint. If clicked save, the next time it appears as wolic.com choice.
2- The radio button selection seems broken.

@felipeerias
Copy link
Collaborator Author

The implementation of this UI is already buggy upstream. For example, it lets you edit the description of the homepage instead of the actual URL:

com igalia wolvic dev-20250429-113606
com igalia wolvic dev-20250429-113621
com igalia wolvic dev-20250429-113627
com igalia wolvic dev-20250429-113635
com igalia wolvic dev-20250429-113655

@felipeerias
Copy link
Collaborator Author

In this PR, I tried to make things more predictable with a small number of changes. The idea was that the "other" value would default to the current value.

Case 1:

  1. select "New Tab"
  2. select "Other"
  3. edit field contains about://home
  4. select "wolvic.com"
  5. select "other"
  6. edit field contains https://wolvic.com/start

Alternatively, we could make the edit field always use the homepage URL by default. Like this:

  1. select any of the other radio buttons
  2. select "other"
  3. edit field contains https://wolvic.com/start

Would that be better?

Clean up the code and fix some edge cases where the homepage was
being incorreclty updated.

Use the current homepage value for the URL edit field, because
otherwise it was far too confusing.

Do not assume that our home webpage will be the default (for example,
the default might be to show the native New Tab UI).
@felipeerias felipeerias force-pushed the felipeerias/newTabByDefault branch from 12f76b6 to a635a16 Compare April 30, 2025 02:43
@svillar
Copy link
Member
svillar commented Apr 30, 2025

I'll let @javifernandez review this as he was the one detecting issues

@javifernandez
Copy link
Member

Umm, what you mean is that the "other" option was already buggy before this PR and that it hasn't been never possible to set a custom home page ?

In any case, I think I understand now what you tried to implement; when selected other, if the user didn't change the value of the text-input field, Wolvic doesn't change the new selected value in the radio-button. You know more about usability than me, but I find it a bit confusing. In my mind, other means whatever it's specified in the text input field, either it it remains with the default value or not.

Alternatively, we can use a different default value, kind of "about:blank", so that the user is forced to set one valid value there.

8000
Copy link
Member
@javifernandez javifernandez left a comment

Choose a reason for hiding this comment

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

I suggested some changes, but perhaps not a blocker to land this patch and continue the discussion offline.

@svillar svillar requested a review from javifernandez May 6, 2025 11:50
@svillar
Copy link
Member
svillar commented May 6, 2025

I think there are issues related to the new tab page that should be fixed before landing this.

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.

3 participants
0