macos_ui icon indicating copy to clipboard operation
macos_ui copied to clipboard

feat: implement MacosTable

Open pithuene opened this issue 3 years ago • 9 comments

I implemented a MacosTable widget which looks similar to the macOS NSTableView (adresses #262 and #199). The table features ordering by column and row selection. I have also added some tests for the basic operations. I am sure there is still a lot to improve, both in code and in UI, but I hope this can serve as a starting point.

This is a screenshot of the table widget running in a process monitor application I am building. Note that this is running on linux and the font is not the one used on macOS. Screenshot_2022-11-18_14-13-43

Pre-launch Checklist

  • [x] I have run dartfmt on all changed files
  • [x] I have incremented the package version as appropriate and updated CHANGELOG.md with my changes
  • [ ] I have added/updated relevant documentation
  • [ ] I have run "optimize/organize imports" on all changed files
  • [x] I have addressed all analyzer warnings as best I could

pithuene avatar Nov 18 '22 13:11 pithuene

This is awesome! @GroovinChip, is there something in the way for merging?

Yetispapa avatar Jan 09 '23 12:01 Yetispapa

Hey @GroovinChip, thanks a lot for giving me feedback on my pull request! I tried to implement your requested changes but am not sure what you were asking for in the changelog file.

Thanks again for your time!

pithuene avatar Jan 16 '23 18:01 pithuene

Hey @GroovinChip, thanks a lot for giving me feedback on my pull request! I tried to implement your requested changes but am not sure what you were asking for in the changelog file.

Thanks again for your time!

I mean add an entry that describes what the new version adds or changes. If you look at the file you'll understand.

GroovinChip avatar Jan 24 '23 08:01 GroovinChip

@pithuene looking forward for the merge! Can you maybe give me an example, how the ordering actually work?

It seems, when I change the datasource like so:


StreamBuilder(
          stream: widget.bloc.items,
          initialData: widget.bloc.items.value,
          builder: (BuildContext context, snapshot) {

....

    changeOrder: (order) {
      // this will update the StreamBuilder
      widget.bloc.changeOrder(order.direction.name);
      return true;
    },

The ordering gets messed up somehow. Can you help me here out. Thanks

Yetispapa avatar Jan 24 '23 11:01 Yetispapa

I can take a look @Yetispapa but I would need more context, its hard to tell much just from the code you've shown. You need to implement the ordering yourself (which you probably did in bloc.changeOrder, but I can't see). Also I am not sure why you wrapped the table in a StreamBuilder, you should call dataChanged on the data source after the data has changed and let the table do the rebuilding internally.

pithuene avatar Jan 24 '23 13:01 pithuene

@pithuene, thanks for the quick repsonse. Alright. Let me check it again.

Yetispapa avatar Jan 25 '23 10:01 Yetispapa

@pithuene anything new to report on this?

GroovinChip avatar Feb 04 '23 21:02 GroovinChip

@GroovinChip not yet. I've been too busy the last few weeks, might find the time next week though.

pithuene avatar Feb 04 '23 23:02 pithuene

No problem my dude, take your time. Your life comes first :)

GroovinChip avatar Feb 04 '23 23:02 GroovinChip

PR gonna be 2 years in couple e months 🍾

romanr avatar Sep 28 '24 21:09 romanr

Yeah, sorry about that, but I won't be able to finish it. If anyone wants to use my code and take it from here, feel free. But I'm closing the PR for now.

pithuene avatar Sep 29 '24 09:09 pithuene