Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mulit-Tag ordering #937

Open
Runecreed opened this issue Mar 13, 2024 · 2 comments
Open

Mulit-Tag ordering #937

Runecreed opened this issue Mar 13, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Runecreed
Copy link

Problem

When using a multi-tag column, the order of appearance of the tag is not following the order you specify -- during the selection phase the order persists but when finalizing they move around

Solution

Keep the order the multi-tags were selected in

Additional details

Im wondering if this was intentional as i can see a use case where having the multi-tags alphabetically or in some other consistent order makes sense, for my use case I'm using them as a sequence to follow, so the order of display is important

Other than that this plugin does exactly what I want but this is a key feature for me ;(

@Runecreed Runecreed added the enhancement New feature or request label Mar 13, 2024
@42ama
Copy link
Contributor

42ama commented Apr 23, 2024

I would classify this issue as follows.
Problem:

  • When adding tags to a column of type Multi-tag, there is no option to choose sorting. The values within a single field in the column are sorted in a random order.

Solution:

  • Add an Options menu to columns of type Multi-tag. In the menu, you can choose one of two sorting options.
    • Ascending
    • Descending
  • For the Ascending and Descending options, sorting is done by the content of the tag.
  • For the Ascending and Descending options, the current model, saved in a .loom file, is sufficient. Sorting will require looking at model.columns.tags[N].content and sorting by the value found there.

42ama added a commit to 42ama/obsidian-dataloom that referenced this issue Apr 25, 2024
+ Added new Column property - contentsSortDir, it stores information about sorting the content in the cells of the column. At the moment the only type that can store several items in a cell is MultiTag, so the processing logic was added only for it.
+ Added a options submenu for columns with MultiTag type, where you can select the sorting type for the cell contents.
decaf-dev pushed a commit that referenced this issue Apr 27, 2024
* #937 Mulit-Tag sorting feature

+ Added new Column property - contentsSortDir, it stores information about sorting the content in the cells of the column. At the moment the only type that can store several items in a cell is MultiTag, so the processing logic was added only for it.
+ Added a options submenu for columns with MultiTag type, where you can select the sorting type for the cell contents.

* Renamed `contentsSortDir` to `multiTagSortDir` and `Contents sorting` to `Sort`
decaf-dev added a commit that referenced this issue Apr 28, 2024
* #937 Mulit-Tag sorting feature (#944)

* #937 Mulit-Tag sorting feature

+ Added new Column property - contentsSortDir, it stores information about sorting the content in the cells of the column. At the moment the only type that can store several items in a cell is MultiTag, so the processing logic was added only for it.
+ Added a options submenu for columns with MultiTag type, where you can select the sorting type for the cell contents.

* Renamed `contentsSortDir` to `multiTagSortDir` and `Contents sorting` to `Sort`

* feat: add display name for sort direction

* fix: don't close menu on sort select

* build: fix build errors

* chore: bump to 8.16.0

---------

Co-authored-by: Maxim <45532431+42ama@users.noreply.github.com>
@42ama
Copy link
Contributor

42ama commented May 1, 2024

@Runecreed please update DataLoom to version 8.16.0, in this version added the ability to customize sorting for multi-tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants