avo icon indicating copy to clipboard operation
avo copied to clipboard

Ability to customize what columns are shown in association context.

Open adrianthedev opened this issue 2 years ago • 1 comments

Discussed in https://github.com/avo-hq/avo/discussions/802

Originally posted by MrJoy April 9, 2022 image

In this view, you can see that I have vendor displayed on the items list. I would prefer that column only be visible when on the standalone items resource view. There's frequently cases where I want to not display certain fields in an embedded view, or display certain fields only in an embedded view.

One approach to handle this might be to be able to define multiple resource classes that represent a given model, with only one showing up on the sidebar and the remainder being explicitly referenced in the field definitions of other resources.

e.g.

field :some_collection, as: :has_many, resource: SomeCollection::SpecialCaseResource

Not sure what a sustainable/maintainable structure for organizing resource classes would be under such an arrangement.

Another approach would be to expand show_on / hide_on, but I feel like that would leave your team with considerably more complex and hard to maintain code, as well as leading to more tangled code on my end. It would have the advantage of minimizing duplication of application-side code in the typical case.

adrianthedev avatar Apr 10 '22 17:04 adrianthedev

This issue has been marked as stale because there was no activity for the last 60 days

github-actions[bot] avatar Jun 10 '22 03:06 github-actions[bot]

This has been implemented.

adrianthedev avatar Dec 03 '22 20:12 adrianthedev