rdmo icon indicating copy to clipboard operation
rdmo copied to clipboard

Enable markdown renderer for more than just help texts

Open triole opened this issue 2 years ago • 6 comments

The goal of this pull request is to have the markdown renderer available for question texts as it is right now for help texts.

Description

  • enable markdown rendering for the following elements in questions answer section
    • page titles
    • question set titles
    • question texts

Related issue: #441

Motivation and Context

The STAMP project needs it because they love to style their text snippets.

Remarks

There are titles which are bold by default. I did not want to have those and removed them using css.

.form_label {
    font-weight: unset;
}

My fix..

How has this been tested?

Screenshots (if appropriate)

Types of Changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Documentation content changes
  • [ ] Other (please describe):

Checklist

  • [ ] I have read the contributor guide.
  • [ ] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

triole avatar Feb 22 '24 13:02 triole

I think this issue is related: https://github.com/rdmorganiser/rdmo/issues/441

jochenklar avatar Feb 22 '24 13:02 jochenklar

yes, thanks. i added it in the description

triole avatar Feb 22 '24 13:02 triole

Coverage Status

coverage: 91.61% (+0.02%) from 91.591% when pulling aafe8948f07fedbca2f9acb00d998f5a796d21b3 on markdown into 065d195043b7ac34a7b6b3180dac69829a3974bc on main.

coveralls avatar Feb 22 '24 13:02 coveralls

does this also have to do with adding (markdown) links to the text of options for example?

MyPyDavid avatar Apr 24 '24 15:04 MyPyDavid

Currently not. This is something that will probably be added in the future. Every change should mentioned above in the description. What is not in the description is not in the code.

triole avatar Apr 25 '24 12:04 triole

I could add some parts for that if it will make this PR ready for the next release. Is there still much to be done for this PR? It's not clear to me.

When I would add this for the option text, I could simply use your changes and apply them to the options right?

MyPyDavid avatar Apr 25 '24 12:04 MyPyDavid

The markdown support for option text and help are implemeted in the interview branch. Since I want to implement markdown in catalog/section/page/questionset titles and question texts there as well I can add the corresponding code in the non angular parts already here.

jochenklar avatar May 14 '24 15:05 jochenklar

Hi @triole , I opened the PR again, since I think we can add that before the new interview. Please have a look.

One open question, for questions, you need the bold text to not bold, right?

jochenklar avatar Jun 06 '24 15:06 jochenklar

Forget it, I just add a .question-label class so you can remove the font-weight locally.

jochenklar avatar Jun 06 '24 15:06 jochenklar

The only problem is that in the export using markdown (of project_answers) it will be bold since this will not use the css class. Is that ok for your case?

jochenklar avatar Jun 06 '24 15:06 jochenklar

is this for in the 2.2.0 release?

MyPyDavid avatar Jun 19 '24 10:06 MyPyDavid

Yes, the base branch was wrong.

jochenklar avatar Jun 20 '24 08:06 jochenklar