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

Drag and drop for navigation seems broken in lastest pre-release! #3290

Open
Parth opened this issue Sep 16, 2020 · 21 comments
Open

Drag and drop for navigation seems broken in lastest pre-release! #3290

Parth opened this issue Sep 16, 2020 · 21 comments
Assignees
Labels
area-NavigationView NavView control bug Something isn't working help wanted Issue ideal for external contributors team-Controls Issue for the Controls team

Comments

@Parth
Copy link

Parth commented Sep 16, 2020

Prompted by #3131 issue I was asked to update to the latest pre-release.

Updating to this seems to completely disable drag and drop regardless of CanDrop and related settings.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Sep 16, 2020
@ranjeshj ranjeshj added area-NavigationView NavView control team-Controls Issue for the Controls team labels Sep 16, 2020
@ranjeshj
Copy link
Contributor

@Parth Was this working for you in a 2.5 pre-release but then regressed in a newer one? Could you specify which release it was working in and which one it stopped ? What do you mean by drag and drop being disabled ?

@ranjeshj ranjeshj added the needs-author-feedback Asked author to supply more information. label Sep 16, 2020
@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label Sep 17, 2020
@Parth
Copy link
Author

Parth commented Sep 18, 2020

Not sure if you looked into the issue I linked. Before the prerelease I was facing a bug regarding highlight of the navigationview. But here drag and drop is working. This video doesn't capture the tooltip I see when I drag and drop (perhaps a bug in game bar or whatever) but you can see both drag and drop working and the bug I talked about in #3131 in this video.

2.4.3: https://youtu.be/1MSW26ipDls

Now in the 2.5 prerelease (I tried them all), one of these issues is solved, but another is created: https://youtu.be/aCfrSwZzdjI

None of the code has changed, regardless of how hard I try dragging and dropping just behaves as if all of the CanDrag and various other flags related to drag and drop are set to false.

@ghost ghost added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Sep 18, 2020
@ranjeshj
Copy link
Contributor

@Parth would you be able to share a small repro app showing your issue ? That would really help debug. @StephenLPeters can you think of any recent changes NavView change that could have caused this ? It might be worth adding a test for this scenario.

@StephenLPeters
Copy link
Contributor

@chingucoding and/or @Felix-Dev did the change to treeview's drag and drop behavior get checked in already? could that be causing this?

@StephenLPeters
Copy link
Contributor

Silly me, H-Navview doesn't use tree view

@marcelwgn
Copy link
Collaborator

I don't think that those went in yet, but even if so, NavigationView uses ItemsRepeater, not Treeview so that shouldn't make a difference.

@Felix-Dev
Copy link
Contributor

@StephenLPeters Exactly as @chingucoding said :)

@ranjeshj ranjeshj added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Sep 18, 2020
@Parth
Copy link
Author

Parth commented Sep 19, 2020

@ranjeshj I believe you could create a minimal repro with UWP sample code + add drag and drop to the NavigationView components.

My source is available here. More specifically this is my xaml (very small). You wouldn't have any problems running the project as is.

@ghost ghost added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Sep 19, 2020
@StephenLPeters StephenLPeters added help wanted Issue ideal for external contributors and removed needs-triage Issue needs to be triaged by the area owners labels Sep 21, 2020
@Parth
Copy link
Author

Parth commented Sep 27, 2020

The newest prerelease (9.23, and all the other 2.5.*) also breaks muxc:NavigationView.PaneFooter:

behavior in 2.4:

image

behavior in the 2.5 prereleases:

image

Notice the footer has been pushed down.

I think there's a serious regression to the NavigationView in 2.5 and someone needs to take a serious look at an example with:

  • Hierarchical navigation (with lots of elements to verify scroll behavior)
  • Drag and drop
  • Footer

The surface area of the app I've linked is really pretty low, and is a reasonable starting point for such an effort.

I would be happy to assist in the effort, but as it stands right now, there's a minor bug in 2.4 associated with this element, and a major bugs in all the 2.5 releases, and it's pretty concerning, to say the least.

@Felix-Dev
Copy link
Contributor

Felix-Dev commented Sep 27, 2020

@Parth Can you open a new issue for this specific Footer/Settings button behavior? (I am seeing this as well in case of the Settings item. With latest two WinUI 2.5 previews, the Settings item is now no longer always visible but will be pushed out of the screen by NavigationView menu items (if there are enough visible). I don't think this change was intended but more can be discussed in its own issue on the repo. This change seems to have happened as part of the recent footer menu items work.)

@StephenLPeters
Copy link
Contributor

I don't think this was intended either. Lets get it a dedicated issue and we can see about fixing it for the next prerelease.

@yaira2
Copy link
Contributor

yaira2 commented Dec 4, 2020

I am getting this same issue after updating to WinUI 2.5.

@BanCrash
Copy link

BanCrash commented Sep 7, 2021

This seems to be still an issue even on 2.7.0, and also on 2.6.2 and below. I created a simple test using XAML Controls Gallery.

I made a simple test adding "CanDrag="True" on a release that have the WinUI 2.4.0-prerelease.200414001, and on the last main commit, that have WinUI 2.7.0-prerelease.210816001.

On the 2.4.0 it's working as expected, while on the 2.7.0 no.

2.4.0 version, with the last NavigationView example, which is the one that I modified, is working:
GIF 07-09-2021 18-48-19

2.7.0 version, with the same modification on the last NavigationView example, is not working:
GIF 07-09-2021 19-04-50

You can check those examples with that little modification on my fork:

2.4.0 which is working: https://github.com/BanCrash/Xaml-Controls-Gallery/tree/2.4.0-prerelease.200414001

2.7.0 which is not working: https://github.com/BanCrash/Xaml-Controls-Gallery/tree/2.7.0-prerelease.210816001

NOTE: I understand that 2.7.0 is a preview version, but on stable versions of 2.5 / 2.6 is not working neither...

@StephenLPeters StephenLPeters added this to the WinUI 2.8 milestone Oct 26, 2021
@StephenLPeters
Copy link
Contributor

Unfortunately we've yet to have the bandwidth to prioritize this :( We understand it is broken but are juggling competing priorities.

@StephenLPeters
Copy link
Contributor

PSA, we are using the winui 2.8 milestone for tracking purposes, it is not meant to indicate that we are committing to that work.

@ReneeGA2020
Copy link

It's been 2 years. Any update for this bug?

@drasticactions
Copy link
Member

I have a potential workaround for this issue.

image

Setting "CanDrag" to the NavigationItemView alone isn't enough, I also need to set it to the underlying NavigationItemViewPresenter. Then, magically, once I did that, I could drag and drop items on the NavigationView again.

@hecksmosis
Copy link

This allows dragging but does not trigger DragStarting

@drasticactions
Copy link
Member

drasticactions commented Feb 25, 2023

@hecksmosis You should be able to attach that to the NavigationItemViewPresenter as well. https://github.com/drasticactions/MauiFeed/blob/main/src/MauiFeed.WinUI/Views/FeedSidebarItem.cs#L237-L252

I have an example of it in my app. Basically, you would attach that the same way as you would normally to a given element.

https://github.com/drasticactions/MauiFeed/blob/main/src/MauiFeed.WinUI/Views/FeedSidebarItem.cs#L256-L281

Note that this is very much a "workaround" hack and shouldn't be needed. It would be great if the underlying issue here would be fixed, as it should be possible to do this with a Navigation item normally, and I'm not sure what's blocking it from working.

@JoeTomkinson
Copy link

There are a number of use cases where this bit of functionality would be useful. I understand that there may be competing priorities for the next release, but it would be great if this could be looked at with it being in the backlog for nearly 2 years.

@yaira2
Copy link
Contributor

yaira2 commented Jul 13, 2023

Are there any updates on this issue?

@duncanmacmichael duncanmacmichael added the bug Something isn't working label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control bug Something isn't working help wanted Issue ideal for external contributors team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests