Skip to content

Conversation

@benloh
Copy link
Collaborator

@benloh benloh commented Jan 5, 2025

This does two main things:

  1. Parity with MEME Comment system
  • ac-comment and dc-comment should be basically equivalant
  • URComment* components should be basically equivalent with the conversion of UNISYS calls
  • URCommentThreadMgr has been replaced by URCommentCollectionMgr and all buttons are now managed via URCommentStatus
  • comment-mgr should have a similar API, with mostly database calls unique to each system.
  1. NCNodeTable and NCEdgeTable have been refactored to be simpler functional components.

Wiki Update

(To be added to wiki with the PR)

Comment Templates

Defining Comment Types in the Project Template file

Comment types can be defined in the project's *.template.toml file.

[[commentTypes]]
slug = "cmt"
label = "Comment"

  [[commentTypes.prompts]]
  format = "text"
  prompt = "My Comment"
  help = "You might start with 'I think...'"
  feedback = "Feedback is displayed below the input field."

[[commentTypes]]
slug = "evidence"
label = "Evidence Critique or Suggestion"

  [[commentTypes.prompts]]
  format = "dropdown"
  prompt = "Is this supported by evidence?"
  options = ['😀 Yes', '🤔 Some', '🥲 No']
  help = "Select one."
  feedback = "Only one is selectable"
   
  [[commentTypes.prompts]]
  format = "text"
  prompt = "What would you change?"
  help = "Please be specific to help your friend."

Cascading Comment Types

  1. By default, the first comment type defined in *.template.toml is used as the default comment type.
  2. Any new project will use the comment types defined in _default.template.toml. You can edit that file to have new projects automatically use the comment types defined in _default.template.toml.
  3. If there is no type defined in the *.template.toml file, the system will first try to use the types defined DEFAULT_CommentTypes in dc-comments. This allows you to assign a standard set of comments if you're comfortable code diving, but is not intended for regular use.
  4. If DEFAULT_CommentTypes is not defined in dc-comments, the system will fall back to a single generic template. This ensures that there is ALWAYS a usable comment type even if the project and dc-comments are not defined:
const DEFAULT_COMMENTTYPE: TCommentType = {
  slug: 'cmt',
  label: 'Comment', // comment type label
  prompts: [
    {
      format: 'text',
      prompt: 'Comment', // prompt label
      help: 'Use this for any general comment.',
      feedback: ''
    }
  ]
};

Valid Slugs

Currently (as of 1/6/2025), known CType slugs are:

export type CType =
  | 'cmt'
  | 'tellmemore'
  | 'source'
  | 'evidence'
  | 'clarity'
  | 'steps'
  | 'response'
  | string;

...but you can also use any other string for a custom comment.

NOTES

  • As of 1/6/2025 there is currently no WYSWIG editor for template.toml. You need to edit these by hand.

benloh added 30 commits October 3, 2024 12:32
Rather than show complex "DELETED" for every prompt in a comment type because there may be many.
# Conflicts:
#	app/view/netcreate/components/NCEdgeTable.jsx
#	app/view/netcreate/components/NCNodeTable.jsx
…to use URCommentVBtn (and URCommentCollectionMgr)
…d directly by URCommentVBtn but we might want to restore this

to force close the currently open comment window and re-open the table comment button
…l components. Simplify URDATA handlers."

"SELECTION" and "HILITE" are not yet implemented.
…te, then dc-comments.DEFAULT_CommentTypes then fall back to DEFAULT_COMMENTTYPE #244
@benloh benloh changed the title DRAFT -- NOT FUNCTIONAL -- Backport MEME Comment Backport MEME Comment Jan 7, 2025
@benloh
Copy link
Collaborator Author

benloh commented Jan 7, 2025

@jdanish Please QA the comment system. The MEME comment system should work like NC's with the addition of being able to set comment types via the project template file.

@jdanish
Copy link

jdanish commented Jan 7, 2025

OK! Do you want me to post issues or comments here if I find things? Also, are the notifications part of the update? I noticed an error there earlier ... Thanks!

@jdanish
Copy link

jdanish commented Jan 7, 2025

Specifically, clicking on the comment number generates an error...

Screenshot 2025-01-07 at 1 55 43 PM

@benloh
Copy link
Collaborator Author

benloh commented Jan 7, 2025

Thanks! A new issue would be helpful for tracking. Otherwise we end up with a hodge podge of comments and replies.

@jdanish
Copy link

jdanish commented Jan 7, 2025

OK, added #321

Will you see these if assigned or do they need to be in project too?

@benloh benloh merged commit a6d91a0 into dev-next Feb 7, 2025
@benloh benloh deleted the dev-bl/match-meme-comment branch February 27, 2025 19:12
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.

3 participants