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

4472 focus list item on select #4474

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

williambrode
Copy link

@williambrode williambrode commented Dec 22, 2023

Description:

Fixes #4472

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

Where applicable:

  • Public APIs match existing style and have Since: line.
  • Any breaking changes have a deprecation path or have been discussed.
  • Check for binary size increases when importing new modules.

@Jacalz
Copy link
Member

Jacalz commented Dec 22, 2023

The includes a commit from Drew. Have you based the branch on the master branch?

@Jacalz
Copy link
Member

Jacalz commented Dec 22, 2023

Also, please always fill out the checklist in the template and try to add some tests.

@Jacalz Jacalz added the information-needed Further information is requested label Dec 22, 2023
@andydotxyz
Copy link
Member

I think the tests won't run because of the same (re)base issue showing the stray commit.
Can you please try cherry picking your commit onto latest develop then force pushing to this branch again @williambrode? Hopefully that would resolve everything.

@williambrode williambrode force-pushed the 4472-focus-list-item-on-select branch from 39940c0 to 0bf5d62 Compare April 26, 2024 00:19
Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

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

This seems to be working now. Can you please add a test for it?

@coveralls
Copy link

Coverage Status

coverage: 64.908% (+0.01%) from 64.898%
when pulling 0bf5d62 on williambrode:4472-focus-list-item-on-select
into 0b94408 on fyne-io:develop.

@williambrode williambrode force-pushed the 4472-focus-list-item-on-select branch from 0bf5d62 to 04ae6da Compare April 26, 2024 16:36
@williambrode
Copy link
Author

I ran the test on develop without my changes and confirmed it fails.

@williambrode
Copy link
Author

Mobile test failed - I can either change the test or change the code. Does someone know why the code doesn't focus the list for mobile? I was trying to change as little as possible but figured it might be worth asking.

li.onTapped = func() {
		if !fyne.CurrentDevice().IsMobile() {
			canvas := fyne.CurrentApp().Driver().CanvasForObject(l.list)
			if canvas != nil {
				canvas.Focus(l.list)
			}

			l.list.currentFocus = id
		}

		l.list.Select(id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information-needed Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants