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

Target Audience or Evaluation property controls #451

Open
1 task done
edarroudi opened this issue May 2, 2022 · 6 comments
Open
1 task done

Target Audience or Evaluation property controls #451

edarroudi opened this issue May 2, 2022 · 6 comments
Assignees
Labels
area:new-control status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail.

Comments

@edarroudi
Copy link

Category

  • Enhancement

Version

Please specify what version of the library you are using: [3.2.0]

Desired Behavior

Coming from pnp-modern-search, I want to add a Property Control where the user can add some evaluation rules based on a internal object that has a token structure. Based on the result of the evaluation, the webpart should be hidden or shown.
Originally I planned to just add the code in the webparts of modern search but @wobba, a maintainer, forwarded me here - he probably saw more use than me in the "control". Here is a link where I describe the solution: microsoft-search/pnp-modern-search#2047

I just used PropertyFieldCollectionData there.

Generally I think there is a need for Audience Targeting because it is very useful to control your webpart. In this case I think we might have to different issues / controls:

a) An Evaluation UI Property Menu

This would look someting like this:
image
image

I don't know how useful it would be. Maybe if it is implemented with a tree control and lets users create more complex And / Or based evaluations? Maybe you pass an evaluation token context and the control checks for tokens the user adds to the evaluation rules and if there is some spelling problem or a token doesn't exit, we get a warning / valdiation error? Or maybe an autocomplete feature?

b) An Evaluation Hide/Show Control that takes a ruleset and hides the webpart if the rule is evaluated to false.

Sorry, I know this might be a confusing request - I didn't think of coming here and requesting this - but since @wobba suggested it I will give it a try. Maybe you guys get an idea - I would implement this.

@ghost
Copy link

ghost commented May 2, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label May 2, 2022
@joelfmrodrigues
Copy link
Collaborator

@edarroudi Thanks for the suggestion. I agree with Mikael, it would be a nice new control to have in the library and then you could just re-use it inside PnP search web parts.
A tree view control would be very nice 🙂 But really up to you if you prefer to start with a version like the screenshots above or try going for the full support of And / Or.
Please let me know if you are still interested in implementing this and I will assign this item to you to prevent others from working on it at the same time.

@edarroudi
Copy link
Author

Thanks for the reply @joelfmrodrigues . I'll gladly do it - probably the treeview version. You can assign it to me and I start asap on a preview version. We can discuss the features / interface of the preview version then...

@joelfmrodrigues
Copy link
Collaborator

@edarroudi many thanks and no rush from our side 🙂 We will review it whenever it's ready

@joelfmrodrigues joelfmrodrigues added the status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. label May 9, 2022
@edarroudi
Copy link
Author

hey @joelfmrodrigues I created a draf PR since I'm not finished but I would like to discuss some features / interface. Would you mind having a look?

@joelfmrodrigues
Copy link
Collaborator

@edarroudi sorry for the late reply, really busy at my end recently and was unable to keep up with everything
Will try to review over the next days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:new-control status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail.
Projects
None yet
Development

No branches or pull requests

2 participants