cityofaustin / cityofaustin/techstack

Compounding URL-length when *ordering* search result columns in Joplin

Open
#3,261 0 comments 0 reactions 0 assignees View on GitHub
Bug Reported Joplin Alpha P5 Team: Dev
Dominant language
No language data
Stars
11
Forks
3
PR merge metrics
No merged PRs in 30d

Description

In Joplin, if sort by column in the search results area, you'll see the correct behavior. However, the url compounds by just *adding* the query params rather than *replacing* the `ordering` field.
- So if you sort by column a few times you could end up with a really long url if you chose to copy and paste that state of the search results

Here's an example...
- This url was copied after a user sorting several columns back and forth.
- `https://joplin-pr-2581-content-main-pa.herokuapp.com/admin/pages/search/?ordering=latest_revision_created_at&ordering=-latest_revision_created_at&ordering=latest_revision_created_at&ordering=-latest_revision_created_at&ordering=latest_revision_created_at&ordering=-latest_revision_created_at&ordering=latest_revision_created_at`
- However, the link simplifies to... this url
- `https://joplin-pr-2581-content-main-pa.herokuapp.com/admin/pages/search/?&ordering=latest_revision_created_at`

**To Reproduce**

1. Go to 'http://joplin.herokuapp.com/admin/pages/search/'
2. Click on any of the column headers (maybe "Author"). Then, click again, ... and again.
3. You'll see the correct behavior, but if you look at the url, it got really really long.
4. See example above.

**Expected behavior**
- The `ordering` field replaces the previous `ordering` field, rather than concatenating it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.