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

add settings for note item status #66

Merged
merged 2 commits into from
Dec 24, 2023

Conversation

AndryYosua
Copy link
Contributor

@AndryYosua AndryYosua commented Dec 9, 2023

While todo item has status overdue, open or done, note item do not has one.
This PR add settings for note item status

Steps

  • create a note and todo note
  • create note-overview
    <!-- note-overview-plugin
    search: ...
    fields: status, title
    status:
      todo:
        open: "☐"
        done: "🗹"
        overdue: "⚠"
    -->
    

Actual result

note status and todo status has same status

status title
todo overdue
🗹 todo completed
todo with duedate
todo open
note 1

Expected result

as note do not have status (overdue, open or done), note status should be empty.

status title
todo overdue
🗹 todo completed
todo with duedate
todo open
note 1

Other Result

<!-- note-overview-plugin
search: ...
fields: status, title
status:
  note: "🗈"
  todo:
    open: "☐"
    done: "🗹"
    overdue: "⚠"
-->
status title
todo overdue
🗹 todo completed
todo with duedate
todo open
🗈 note 1

@JackGruber
Copy link
Owner

Please create tests for the PR

### Steps

- create a note and todo note
- create note-overview
  ```
  <!-- note-overview-plugin
  search: ...
  fields: status, title
  status:
    todo:
      open: "☐"
      done: "🗹"
      overdue: "⚠"
  -->
  ```

### Actual result

note status has same status as todo open status

| status | title                                                   |
| ------ | ------------------------------------------------------- |
| ⚠      | [todo overdue](:/722c80cb665549fb94472d4802cfbdc5)      |
| 🗹      | [todo completed](:/6adfa0f5c5ab4642bc696db08a212baf)    |
| ☐      | [todo with duedate](:/27de5a7fa4424ad993c6ee251ee88812) |
| ☐      | [todo open](:/01bca8a69a9341cabcba59531c0cad8e)         |
| ☐      | [note 1](:/1809922cc3fa49c1bf8f045cbf6f8e55)            |

### Expected result

as note do not have status (`overdue`, `open` or `done`), note status
should be empty.

| status | title                                                   |
| ------ | ------------------------------------------------------- |
| ⚠      | [todo overdue](:/722c80cb665549fb94472d4802cfbdc5)      |
| 🗹      | [todo completed](:/6adfa0f5c5ab4642bc696db08a212baf)    |
| ☐      | [todo with duedate](:/27de5a7fa4424ad993c6ee251ee88812) |
| ☐      | [todo open](:/01bca8a69a9341cabcba59531c0cad8e)         |
|        | [note 1](:/1809922cc3fa49c1bf8f045cbf6f8e55)            |
@AndryYosua AndryYosua force-pushed the remove_status_for_note_item branch from 8665694 to 74612fe Compare December 15, 2023 03:31
@AndryYosua
Copy link
Contributor Author

Please create tests for the PR

done
i add documentation too

@AndryYosua AndryYosua changed the title remove status for note item add settings for note item status Dec 15, 2023
@JackGruber
Copy link
Owner

Please make the following adjustments:

  1. is_todo should only be added if it is needed
    // include todo fields for the status field calculation
    if (fields.includes("status")) {
    additionalFields.push("todo_due");
    additionalFields.push("todo_completed");
    }
  2. The default option should also be adjustable in the settings, as the other options are also in the plugin settings section
  3. Please note that the develop branch already has a translation!

I think then I can merge the PR

@AndryYosua
Copy link
Contributor Author

Please make the following adjustments:

1. is_todo should only be added if it is needed
   https://github.com/JackGruber/joplin-plugin-note-overview/blob/736916f15a02eb94c41261b196cc5c6e20126bac/src/noteoverview.ts#L844-L848

done

2. The default option should also be adjustable in the settings, as the other options are also in the plugin settings section

and done

@JackGruber JackGruber merged commit 1c94c24 into JackGruber:master Dec 24, 2023
@AndryYosua AndryYosua deleted the remove_status_for_note_item branch April 23, 2024 03:46
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.

2 participants