Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Change URL to match language query param #270

Closed
wants to merge 13 commits into from
Closed

Conversation

lpercivalDEV
Copy link
Contributor

@lpercivalDEV lpercivalDEV commented Oct 1, 2019

Fixes #256

  • Take query param and convert to lowercase/no spaces for matching function
  • Change URL based on converted query param
  • Convert select dropdown options to lowercase and no spaces for matching function
  • Compare list of options against converted query param to find a match
  • If there's a match:
    • Scroll to issues section
    • select correct language from dropdown option
    • Filter issues based on selected language
  • If there's no match, do nothing

Langauages are not being filtered due to being tied to click event - will look at change/refresh code to model the change after.

@lpercivalDEV lpercivalDEV self-assigned this Oct 3, 2019
@lpercivalDEV
Copy link
Contributor Author

lpercivalDEV commented Oct 4, 2019

I moved all of my work from language_param_URL.js into language_filter.js since I needed to reference functions in the filter file. The language_param_URL.js file was deleted due to being redundant/obsolete.

This was not asked for - but I felt it was important for UX:

  • I added the ability to update the URL if a user clicks a new language from the dropdown and also remove the query from the URL if they click the "remove filter" button.

  • URLs can now be copied and pasted into new tabs/windows and the query param will still function - scroll to the issues section and filter based on queried language

no-filter
js-lang-filter-and-URL-update
python-query
python-query-result

@lpercivalDEV lpercivalDEV marked this pull request as ready for review October 4, 2019 20:01
@mkcode
Copy link
Contributor

mkcode commented Oct 8, 2019

@lpercivalDEV - I need to pair with you to refactor this. In general, there is way more code here than is necessary.

@lpercivalDEV
Copy link
Contributor Author

lpercivalDEV commented Oct 31, 2019

Updated PR: #386

This was redone in the query-param branch based off latest master (see Updated PR above). This PR is now obsolete and will be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Homepage language query param
2 participants