publiclab / community-toolbox

Tools to understand and welcome people into a contributor community
https://code.publiclab.org
MIT License
142 stars 197 forks source link

fixes: #575 links to change selected Repo #578

Closed on2onyekachi closed 2 years ago

on2onyekachi commented 2 years ago

fixes: #575 Before:

https://user-images.githubusercontent.com/66228222/168657818-eb2f8841-a174-4dc2-8ec6-e926787688ed.mov

After:

https://user-images.githubusercontent.com/66228222/168657923-d3087f53-a236-45f7-9f9f-8d744b70fd7a.mov

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.

Thanks!

TildaDares commented 2 years ago

@on2onyekachi When I tried it locally, it redirected to another URL entirely. We want only the repo to change.

https://user-images.githubusercontent.com/63427719/168799052-87aa7090-7a04-4dae-ab0b-b0b34a54ac39.mov

on2onyekachi commented 2 years ago

I see. I also did experience this while working locally. I guess that is a result of the hard-coded URL from the config.json file. I had to change the URL pointing to my local server URL to 127.0.0.1 before actually working on it. Screenshot 2022-05-17 at 14 58 59

Maybe we could get a solution that should allow the use of absolute URLs/URIs that work locally in a local development environment and also work on the remote server without modification.? Thanks @TildaDares

TildaDares commented 2 years ago

@on2onyekachi Let's take the easy route and leave only the changes in index.html and configure.js. The rest can be removed. Thanks!!

on2onyekachi commented 2 years ago

@on2onyekachi Let's take the easy route and leave only the changes in index.html and configure.js. The rest can be removed. Thanks!!

Okay, though that's like going back to the default behavior of both links. Maybe, is there a much better approach to this?.

I also think due to the hash(#) symbol on the URL it can't possibly reload the page, hence the manual reloading of the page on the select repository dropdown buttons.
Screenshot 2022-05-17 at 21 54 40

@TildaDares, Just before I remove the other files, I will want to propose we take out that line in the configure.js file since we're only making use of it for this case only and work directly with the HTML href attribute. href="/#-all". Thereby having an absolute URL that will work on a local environment and also on a server. This should work to fix the redirecting URL and also change the selected repo to all.

on2onyekachi commented 2 years ago

here is how it is.

https://user-images.githubusercontent.com/66228222/168928209-dcb73197-6cd7-4341-8a42-f588e63ef616.mov

TildaDares commented 2 years ago

@on2onyekachi Go for it!!

on2onyekachi commented 2 years ago

Yeah!! Thanks, @TildaDares 🙂

on2onyekachi commented 2 years ago

@TildaDares Done. Please review.

on2onyekachi commented 2 years ago

Can I just fix just that? @TildaDares thanks.

TildaDares commented 2 years ago

Thank you for this @on2onyekachi!!!