Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$100] Filter "pills" should not pull form a static file. #15

Closed
wdprice opened this issue Jul 10, 2020 · 11 comments
Closed

[$100] Filter "pills" should not pull form a static file. #15

wdprice opened this issue Jul 10, 2020 · 11 comments
Assignees
Labels
enhancement New feature or request medium priority Not a roadblock to release but must be addressed at some point tcx_Assigned tcx_FixAccepted tcx_Paid

Comments

@wdprice
Copy link

wdprice commented Jul 10, 2020

The "pills" near filters should pull directly from a database, not from a flat file outlining the options.

Example of current state:
image
The locations listed are defined in: https://github.com/topcoder-platform/u-bahn-app/blob/develop/client/src/services/static-data.js

Future State:
Default pill values should be determined by values that exist in the database for the current organization.
Same behavior should apply for Achievements.

@wdprice
Copy link
Author

wdprice commented Jul 10, 2020

@cwdcwd - Another option here is could allow orgs to define the default pill values per org then look up the rest. This would be useful for cutsomers which a number of set offices (like a certain finserv company who has Zurich, Barcelona, Japan, etc.).

@wdprice wdprice added enhancement New feature or request medium priority Not a roadblock to release but must be addressed at some point labels Jul 20, 2020
@wdprice wdprice added this to the v1.0 - Initial Launch milestone Jul 20, 2020
@callmekatootie
Copy link
Collaborator

@wdprice Do we need to carry this out for Achievements too?

@callmekatootie callmekatootie added the question Further information is requested label Jul 21, 2020
@wdprice
Copy link
Author

wdprice commented Jul 21, 2020

@callmekatootie Yes

@callmekatootie callmekatootie removed the question Further information is requested label Jul 21, 2020
@callmekatootie
Copy link
Collaborator

Expected:

  • Currently, on page load, after selecting org, we get the list of attributes located in that org (see the network requests made after org selection)
  • In this list, there will be an attribute with name "location" - case sensitive. Read it off the REACT_APP_ATTRIBUTE_ID_LOCATION environment variable which will have the value of location.
  • Note the id of this attribute - DO NOT hardcode the attribute id, as it is different for different orgs.
  • Now, check out Manage Filters tab. When user activates any custom attribute filter, it appears in the sidebar. User can then search for values, which results in network requests based on the value entered. Make a note of the api call being made, and the values passed to it, which includes the attribute id.

Now, for this ticket, we are expecting the following changes:

  • For the Location filter, we currently get the values statically. Delete the static values (and any associated code).
  • Next, you will use the attribute id for "location" attribute, and just like the filter for the custom attributes, for location, the filter will be a suggestion box where user can type values and they will get suggestions
  • For this, you need to use the same api call as the one for the custom attributes but you will be passing the attribute id of location here instead to get the values for location.

Rest of the workflow will be the same - user will get suggestions in the dropdown (or no results found message when no results are available) and user can select a value from the suggestion which will then trigger the search based on the selected location. User can reset the filter as well as remove individual selected filter pills.

IMPORTANT - Solution expected in 12 hours after you pick. DO NOT pick if you cannot provide solution within this time.

@callmekatootie callmekatootie changed the title Filter "pills" should not pull form a static file. [$100] Filter "pills" should not pull form a static file. Jul 27, 2020
@callmekatootie
Copy link
Collaborator

Also note - ticket talks about Achievements too. But for now, ignore it.

@cwdcwd
Copy link
Contributor

cwdcwd commented Jul 27, 2020

Contest https://www.topcoder.com/challenges/30134497 has been created for this ticket.

This is an automated message for lazybaer via Topcoder X

@cwdcwd
Copy link
Contributor

cwdcwd commented Jul 27, 2020

Contest https://www.topcoder.com/challenges/30134497 has been updated - it has been assigned to callmekatootie.

This is an automated message for lazybaer via Topcoder X

@cwdcwd
Copy link
Contributor

cwdcwd commented Jul 27, 2020

Contest https://www.topcoder.com/challenges/30134497 has been updated - it has been assigned to genycopedison.

This is an automated message for lazybaer via Topcoder X

@callmekatootie
Copy link
Collaborator

@phongnt Please assign yourself again - would like TCX to pick up your name instead of mine

@phongnt phongnt self-assigned this Jul 27, 2020
phongnt added a commit that referenced this issue Jul 27, 2020
phongnt added a commit that referenced this issue Jul 27, 2020
phongnt pushed a commit that referenced this issue Jul 28, 2020
phongnt pushed a commit that referenced this issue Jul 28, 2020
callmekatootie added a commit that referenced this issue Jul 28, 2020
phongnt pushed a commit that referenced this issue Jul 28, 2020
phongnt pushed a commit that referenced this issue Jul 28, 2020
callmekatootie added a commit that referenced this issue Jul 28, 2020
@callmekatootie
Copy link
Collaborator

Achievements filter being taken up in #620

@cwdcwd
Copy link
Contributor

cwdcwd commented Jul 29, 2020

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30134497

This is an automated message for lazybaer via Topcoder X

cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
cagdas001 pushed a commit to cagdas001/u-bahn-app that referenced this issue Jul 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request medium priority Not a roadblock to release but must be addressed at some point tcx_Assigned tcx_FixAccepted tcx_Paid
Projects
None yet
Development

No branches or pull requests

4 participants