deprem-yardim-frontend
deprem-yardim-frontend copied to clipboard
feat: filter url parameters
Description
discord username: Tundra#9805
**closes #893 **
Filter can now be able to get relevant URL parameters like 'lastTime=last30Minutes' and when a filter change, a parameter added to url to share the link.
## Things to check before creating a PR
- [X] I have inspected my topic, checked.
- [X] If it is a core feature, executed detailed tests.
Creating PR rules
- [ ] PR must be created for an issue with approved tag. Otherwise PR will be rejected.
- [ ] Relevant issue number: The issue number related to PR must be attached to head of PR header, after prefix after prefix # must be attached in parenthesis. A header like this could be used "prefix(#issue_number): PR header" .
- [ ] A descriptive and understandable title: The PR title should clearly describe the nature and purpose of the changes. The PR title should be the first thing displayed when the PR is opened. And it should follow the semantic commit rules. For example, a title like "docs(#issueId): Add README.md" can be used.
- [ ] Related file selection: Only relevant files should be touched and no other files should be affected.
- [ ] Format and Lint Suitability : The code should be made in accordance with a certain format standard and examined according to the lint rules.
- [ ] Clean commit history: The commits where the changes are made should be clear and organized.
- [ ] Opening PR when job is completed: PR should be opened when job is completed and sent for review by other team members.
Changes
- [X] Filter related components (ChannelFilterMenu, CommonFilterMenu, FilterTimeMenu, ReasonFilterMenu) improved with url parameters
- [X] addParameterToUrl and getParameterValueFromUrl util functions added
How were these changes tested?
I've tried various combinations of URL parameters, no problem.
Example Link: LOCALHOST/en?lat=38.094574707566274&lng=35.211181640625&zoom=7&lastTime=last3Hours&reasons=erzak%2Cyemek&channel=twitter
Test Configuration:
- Firmware version:
- Hardware:
- Toolchain:
- SDK:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
deprem-yardim-frontend | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 16, 2023 at 3:53PM (UTC) |
Meanwhile, I can see your deployment has failed. To fix it
- yarn build
- find errors
- fix
- commit and push
Meanwhile, I can see your deployment has failed. To fix it
- yarn build
- find errors
- fix
- commit and push
Done, no errors occurred.
Some other params like lat
or zoom
was overriding the existing ones. So commit 17b4bc72b1ca046bb766849611c4444f26f32f5e fixes that issue with keeping the existing ones.
we are doing a big refactor & redesign ty so much for the contribution and sorry for not taking this in.