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

Add provision for KVP values to be displayed on User Listing view #46

Open
JimKerslake opened this issue Aug 22, 2023 · 5 comments
Open

Comments

@JimKerslake
Copy link
Contributor

New property to the KVP listing config will result in it getting added to the user listing.
(Note - much more complex if you want the column to be sortable - won't tackle that for the moment)

JimKerslake added a commit that referenced this issue Aug 22, 2023
@JimKerslake
Copy link
Contributor Author

This is achieved mainly via view overrides.
So we need a new NuGet cloudscribe.Kvp.Views.BS5
containing
Index_kvp
UserGridPartial_kvp
UserListPartial_kvp

We have no choice but to rename these views here, since identically named view overrides in multiple NuGet packages have issues of precedence. But this does mean that in Kvp systems we will "just have to know" that these are the view names in use (if we want to override them further).

This mechanism only works for non-Native (KVP) properties -
i.e. those that are not already held in the main users table and not already listed by default in the user admin view.

The default user listing screen will always include the 'Native' properties
Created
Email/Login
Display Name
First name
Last Name

However the user screen will now also include the KVP values for any additional properties specified in config with:
"VisibleOnUserListing": "true"

In the case that your KVP definitions in the json config also include native properties -"VisibleOnUserListing" will currently have no effect on them (i.e. you can't get rid of a native property by setting it false... you can only add more kvp properties by setting them true).

If there are 2 or more additional KVP properties in the listing, the screen will open up with the vertical admin menu hidden (i.e. having used the littler toggler on the right to give more horiz space).

To do -
We might want to be able to pass in a formatting string from config - otherwise dates are going to come out in horrible long form.

JimKerslake added a commit that referenced this issue Aug 25, 2023
@JimKerslake
Copy link
Contributor Author

cloudscribe.UserProperties.Kvp >> 6.0.1
cloudscribe.UserProperties >> 6.0.1
cloudscribe.Kvp.Views.BS5 6.0.0

Will need the latter adding to the template too :/

@JimKerslake
Copy link
Contributor Author

JimKerslake commented Aug 25, 2023

OK I'm adding in a new json config property which is the name of the user listing view:

    "ProfilePropertySetContainer": {
        "UserListingViewName" :  "index_kvp",
        "PropertySets": []

I have no choice but to package up differently named views for this (because of the multiple nuget view override issue) but it's going to be hellishly confusing for anyone wanting to use this package if their user listing views all change name invisibly to index_kvp - this would break any existing UserAdmin/index.cshtml view overrides in deployed solutions.

So at least now if they want to make use of this feature then there needs to be an intentional configuration step to ask for that new view (and thence its partial children)

@JimKerslake
Copy link
Contributor Author

cloudscribe.UserProperties.Kvp >> 6.0.2
cloudscribe.UserProperties >> 6.0.2
cloudscribe.Kvp.Views.BS5 6.0.0

JimKerslake added a commit that referenced this issue Aug 25, 2023
JimKerslake added a commit that referenced this issue Aug 25, 2023
@JimKerslake
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant