Closed heymarkreeves closed 9 years ago
Right, Dan realized as we were designing the API -- admins have to be able to curate what interests there are, and users have to be able to see and opt in/out based on that list of available interests.
We realize this means you'll have to do two requests to render the interests UI: one to get the list, the second to set checked values for the current user, hence the two endpoints.
Let me know if I can help in any way on this. Thanks!
Hey there, all!
Confirmed; I've created some sample JSON files that we can use for testing the interest subsetting, and have included them in the front-end Github project for Angela to use and reference:
Thanks!
Hi, Angela!
Can you fork the latest Master (that Sherri's working in) and start working on these new items? This one can be done outside of the site scripts, as it's basically a utility function.
We need a function that we can pass two JSON lists into. One will be a full list of all interests, which are tags. The other will be a list of those interests the user has selected.
The function needs to return a list where the user-selected interests have been removed from the full list, so that we can render that after their selected items.
Static JSON lists are in the repository per Sherri's previous comment. Let me know if you have any questions.
Thanks!
Mark
I'm on it! I'll let you know if I run across any complications.
Angela's script is integrated and working well! Closing the issue. :)
We have two JSON arrays coming back for Interests:
We need a function that will compare the two, and return the subset of possible interests that do not intersect the user's interests. I.e., possible interests minus user interests = unchecked interests to display.
Sherri, can you confirm and provide example JSON for both lists? I can ask Angela to take a look at this.
Thanks!
Mark