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

Ability to filter desired terms #50

Open
Tracked by #502
jeffpaul opened this issue Apr 8, 2019 · 3 comments
Open
Tracked by #502

Ability to filter desired terms #50

jeffpaul opened this issue Apr 8, 2019 · 3 comments
Assignees
Labels
help wanted Extra attention is needed needs:engineering This requires engineering to resolve.

Comments

@jeffpaul
Copy link
Member

jeffpaul commented Apr 8, 2019

Splitting this out from #28:

filtering in/out of desired terms (aka whitelist/blacklist)

This would allow site owners to either (1) limit automated tags to existing tags within their site or (2) enter a list of tags that should NOT be saved if they happen to be returned from an AI API (e.g., competitor names).

@jeffpaul jeffpaul added this to the Future Release milestone Apr 8, 2019
@jeffpaul jeffpaul added the help wanted Extra attention is needed label Jul 31, 2019
@vikrampm1 vikrampm1 added needs:engineering This requires engineering to resolve. and removed hacktoberfest labels Dec 17, 2021
@TylerB24890
Copy link
Contributor

TylerB24890 commented Mar 3, 2023

I've spent some time thinking about this and putting together an MVP approach locally. I think what I have could work, but we probably want to spend some time discussing UI/UX of this, especially with the plan to redesign the settings pages.

On the Image Processing settings page there is a new select box "Filter Automated Tags" with the options "Allowed Tags" and "Disabled Tags",
Screen Shot 2023-03-03 at 3 05 16 PM

Depending on the selection, another input becomes available. These inputs are controlled by the existing choices.js package.

Allowed Tags:

By default all existing tags are selected. Users can deselect tags they do not want to be returned. (Is this irrelevant since the tags already exist and can't technically be "disabled"?)

The tags fetched are retrieved from the selected "Tag taxonomy" from the same options page.

Default View: (all tags)
Screen Shot 2023-03-03 at 3 10 19 PM

Search View:
Screen Shot 2023-03-03 at 3 10 35 PM

When the form is submitted the term_id's for each of the selected terms are saved to the option in an array. Then when tags are generated we compare the term names against the tag names and only allow those found in this array.

NOTE: The duplicate tags found in the search dropdown are not intentional. This is a bug that will be resolved before submitting a PR.

Disabled Tags:

Screen Shot 2023-03-03 at 3 21 36 PM

"Disabled Tags" are saved in an array as strings, exactly as shown. When tags are generated they are compared against this list. If a tag is found in this list it is excluded from the saved tags.

If this sounds like an acceptable approach let me know and I'll work to wrap this up and submit a PR. Here is the branch for reference: feature/issue-50-tag-limiting-v2

@jeffpaul
Copy link
Member Author

jeffpaul commented Mar 6, 2023

@TylerB24890 Yes there is a larger Settings page revamp coming, but I would not hold on the overall work here as this can be integrated into that revamp work. That being said, I think the approach here makes sense and agree the default behavior would be None as shown in the first screenshot. If you'd like any designs/UX generated to help move this along, let me know and I'll try to chase that down for you.

@TylerB24890
Copy link
Contributor

TylerB24890 commented Mar 6, 2023

@TylerB24890 Yes there is a larger Settings page revamp coming, but I would not hold on the overall work here as this can be integrated into that revamp work. That being said, I think the approach here makes sense and agree the default behavior would be None as shown in the first screenshot. If you'd like any designs/UX generated to help move this along, let me know and I'll try to chase that down for you.

Thanks, @jeffpaul !

I think I can wrap up the main engineering functionality and circle back to the UI portion of it after if we feel the need. I'll work to wrap this up and will follow up after to discuss any needed UI/UX updates.

@jeffpaul jeffpaul moved this from Incoming to To Do in Open Source Practice Jun 16, 2023
@jeffpaul jeffpaul modified the milestones: Future Release, 2.3.0 Jun 16, 2023
@jeffpaul jeffpaul modified the milestones: 2.3.0, 2.4.0 Jul 7, 2023
@dkotter dkotter modified the milestones: 2.4.0, 2.5.0 Nov 7, 2023
@jeffpaul jeffpaul modified the milestones: 2.5.0, Future Release Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs:engineering This requires engineering to resolve.
Projects
Status: To Do
Development

No branches or pull requests

4 participants