这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@silentrald
Copy link
Collaborator

@silentrald silentrald commented Sep 21, 2025

Closes #930

Added a way to sort maps depending on when they were added on the system.

Maintainer Notes:
Current label: Added Date (there might be better label for this)


Note

Introduce added-date sorting for local maps by persisting metadata.json (with addedDate) and update translations accordingly.

  • Maps backend:
    • Persist per-map metadata.json with addedDate on load/import in LocalMapsManagerService; attach metadata to BsmLocalMap.
    • Add constants/utilities for metadata file handling; minor fs-extra imports.
  • Sorting:
    • Add comparator added-date in mapSorter to sort by metadata.addedDate.
  • i18n:
    • Add added-date label to assets/jsons/translations/*.json under maps sort options.

Written by Cursor Bugbot for commit 02ed95e. This will update automatically on new commits. Configure here.

@silentrald silentrald requested a review from Zagrios September 21, 2025 12:31
@silentrald silentrald self-assigned this Sep 21, 2025
@sonarqubecloud
Copy link

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


// Create the metadata then return it to the user
const metadata: BsmLocalMapMetadata = {
addedDate: dateFormat(new Date(), "yyyy-mm-dd'T'hh:MM:ss.l"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bug

The addedDate in metadata.json uses a 12-hour format (hh) without AM/PM indicators. This results in ambiguous timestamps, making it impossible to distinguish between AM and PM times, and prevents accurate chronological sorting of maps.

Fix in Cursor Fix in Web

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silentrald can you fix if that's true ? 😅

Copy link
Collaborator Author

@silentrald silentrald Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zagrios Yeah, seems to be like it. Let me check the existing formats as well, if this is a problem as well.

Just for reference https://www.npmjs.com/package/dateformat#mask-options

@sonarqubecloud
Copy link

Copy link
Owner

@Zagrios Zagrios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🙌

@Zagrios
Copy link
Owner

Zagrios commented Nov 2, 2025

Thanks @silentrald ❤️
Merging ! 🚀

@Zagrios Zagrios merged commit 2073d8f into Zagrios:master Nov 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT.] : Filter maps by "Most Recently Added To Your Library"

2 participants