datopian / datahub

🌀 Rapidly build rich data portals using a modern frontend framework
https://datahub.io/opensource
MIT License
2.18k stars 324 forks source link

Encode space in files as + in the URLs #1172

Open rufuspollock opened 1 month ago

rufuspollock commented 1 month ago

Encode space in files as + in the URLs.

Right now, files with spaces in them are URL enconded in the traditional way giving URLs like this https://datahub.io/@davidgasquez/handbook/Making%20Decisions. Having Making+Decisions makes it easier to read and reference online from memory.

willy1989cv commented 1 week ago

Encode space in files as + in the URLs

Situation

Currently, URLs with spaces are encoded as %20, which is technically correct but less readable and user-friendly. The encoding of space to %20 is typically handled automatically by Next.js, but we need to verify this and identify any specific places in our code where this encoding occurs (if so).

Problem

The %20 encoding for spaces in URLs reduces readability and can negatively impact user experience. We want to improve this by encoding spaces as +.

Solution

Appetite

This implementation can take from 8 to 12 hours.

Rabbit Holes

Cc: @olayway

olayway commented 6 days ago

The risks you mentioned should be addressed in the solution part.

olayway commented 6 days ago

Avoid any changes that break existing URLs without proper redirection.

This is not really a no go, rather a specific solution part/approach.

rufuspollock commented 2 days ago

@willy1989cv where is the encoding of space to %20 happening? I believe nextjs does it automatically or if not where in our code is it happening? That should be clearly analysed in the situation.

willy1989cv commented 2 days ago

@willy1989cv where is the encoding of space to %20 happening? I believe nextjs does it automatically or if not where in our code is it happening? That should be clearly analysed in the situation.

Yes! @rufuspollock I agree! I was only worried about SEO and was not asking this main question! added it to the shaping! thank you