Minor alignment glitch in proof tableau

Open Beginner friendly
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
frontend

Research direction

Start in frontend/src/app/annotate/tableau-svg/tableau-node.component.ts at lines 72-79 and inspect how mainW and totalW determine node alignment. Reproduce the tableau layout shown in the issue; it is done when the first line is centered on its tree branch while totalW still prevents adjacent branches from overlapping.

Written by the indexing model from the issue text.

Description

bug good first issue

@XanderVertegaal shared this gorgeous screenshot with me:

Image

In nodes 4 and 6, the first line with the id label, head term and argument is left-aligned with the rule on the second line, instead of being centered on the tree branch. This is related to the following piece of code:

https://github.com/CentreForDigitalHumanities/langpro-annotator/blob/0ad5ca82bba744782a56652c7fdde266deef8c39/frontend/src/app/annotate/tableau-svg/tableau-node.component.ts#L72-L79

In a prior version, totalW used to be the same value as mainW (in fact there was no separate mainW). The alignment of the first line of each node is still based on the (now false) assumption that totalW reflects the width of the top line. Hence, if the rule is wider than the first line (which is rare), the first line is left-aligned with the rule.

Solution: make mainW a property of the component and use this for alignment of the first line instead of totalW.

Side note: totalW is still needed to prevent nodes on adjacent branches from overlapping.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
7d 5h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CentreForDigitalHumanities/langpro-annotator

All issues in CentreForDigitalHumanities/langpro-annotator

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.