-
Notifications
You must be signed in to change notification settings - Fork 150
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
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
@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. |
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... |
@edarroudi many thanks and no rush from our side 🙂 We will review it whenever it's ready |
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? |
@edarroudi sorry for the late reply, really busy at my end recently and was unable to keep up with everything |
Category
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](https://user-images.githubusercontent.com/935493/166260153-72ae45b7-7304-44a4-8cfe-e0c131c5b72f.png)
![image](https://user-images.githubusercontent.com/935493/166260195-6f2afe23-d2d4-4476-be88-8acd2bd2b3a8.png)
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.
The text was updated successfully, but these errors were encountered: