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

SidebarItem with disclosureItems and leading widget places disclosure turn-down widget after leading widget #268

Closed
slewallen opened this issue Jun 26, 2022 · 3 comments · Fixed by #272
Assignees
Labels
bug Something isn't working

Comments

@slewallen
Copy link

Description

On Mac OS, an outline view item with disclosure items places the disclosure turn-down before any icon for the outline view item. However, macos_ui is placing the leading icon before the turn-down icon.

See attached screenshot comparing what macos_ui is doing in comparison to actual Mac OS.

Steps To Reproduce

Modify the example at "https://pub.dev/packages/macos_ui/example" to include a leading widget for the Disclosure SidebarItem as such:

            SidebarItem(
              label: Text('Disclosure'),
              leading: MacosIcon(CupertinoIcons.alarm),
              disclosureItems: [
                SidebarItem(
                  leading: MacosIcon(CupertinoIcons.infinite),
                  label: Text('Colors'),
                ),
                SidebarItem(
                  leading: MacosIcon(CupertinoIcons.infinite),
                  label: Text('Item 3'),
                ),
              ],
            ),

Notice that the order is incorrect. For a correct example, see Mac OS Finder or Mac OS Mail.

Expected behavior

Order of disclosure turn-down and leading widget should be reversed. When a SidebarItem has disclosure items and a leading widget along with a label, it should be displayed as: "> 😀 Label" instead of "😀 > Label" in sidebar item.

Screenshots

Comparision of macos_ui and actual Mac OS

@slewallen slewallen added the bug Something isn't working label Jun 26, 2022
@GroovinChip
Copy link
Collaborator

@whiplashoo what do you think about this? It looks like the current implementation is indeed incorrect, but I need to verify.

@whiplashoo
Copy link
Collaborator

Yes, indeed, I also see it in Finder or Disk Utility:

Screenshot 2022-06-30 at 11 40 49 PM

@GroovinChip
Copy link
Collaborator

Alrighty then, I'll whip up a fix. Thanks for reporting this @slewallen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants