cybersemics / em

A beautiful, minimalistic note-taking app for personal sensemaking.
Other
286 stars 119 forks source link

Fix Divider rendering in table #543

Open raineorshine opened 4 years ago

raineorshine commented 4 years ago

Case 1

Normal view

Steps to Reproduce

- a
  - =children
    - =pin
      - true
  - b
    - b1
    - ---
    - b2
  - c
    - This is a longer thought
    - ---
    - c2

Current Behavior

Divider has a fixed width.

image

Expected Behavior

Divider width should be equal to the width of the widest sibling thought.

image

Case 2

Table View, Column 2, only child divider

Steps to Reproduce

- Roadmap
  - =view
    - Table
  - Meta
    - Keyword Search
  - Adult Development
    - ---
  - Hypertext
    - Future of Text
    - ---
    - Rheingold
    - Landow
    - HT Best Of
    - HT '19
    - HT '18
    - HT '17
  - Semiotics
    - ---

Current Behavior

Brave Browser 2024-07-03 12 35 45

Expected Behavior

A divider that is an only child in column 2 of a table should be left aligned with the bullets and as wide as the widest col2 thought in the same table.

In this example, Adult Development and Semiotics have an only-child divider, so their divider widths should be set to the widest width of all col2 thoughts in the table.

The divider in Hypertext is not an only-child, so it should be set to the width of the widest sibling, as usual.

image
incora-dev commented 4 years ago

@raineorshine For now, width for divider calculates like max-width of each subling element. But the problem occurs when we have a group with only divider(in this case we set divider width 85px). What should we do it the case where we have only one divider in the group?

raineorshine commented 4 years ago

Ah, that makes sense. If it is the only-child in column 2 of a table, a divider should be the max-width of all of the column 2 thoughts in the table.

raineorshine commented 5 months ago