diplodoc-platform/transform

Display Issues with Untitled Notes

3y3 opened this issue · 2 comments

3y3 commented

Proof:

image

Problem

When a note lacks a title, the styles are poorly displayed due to the creation of an empty <p> element. This affects the layout and visual consistency, causing unnecessary space or misalignment.

Solution

Modify the logic to prevent the creation of the <p> element when the title is empty. Ensure that the icon remains visible and properly aligned even without a title.

Tasks

  1. Identify Logic: Locate where the <p> element for the title is generated.
  2. Adjust Creation: Implement a conditional that bypasses the creation of the

    element if the title is empty.

  3. Testing: Verify the display of notes with and without titles to ensure proper styling and icon alignment.
  4. Review Icon Styling: Make sure the icon remains properly styled and positioned in the absence of a title.

Where is the code that needs to be corrected located:
md parsing and html elements generation
https://github.com/diplodoc-platform/transform/tree/master/src/transform/plugins/notes

styles
https://github.com/diplodoc-platform/transform/blob/master/src/scss/_note.scss