Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

refactor: use new layout widget - #55

Draft
ckipp01 wants to merge 1 commit into
mainfrom
layout
Draft

refactor: use new layout widget#55
ckipp01 wants to merge 1 commit into
mainfrom
layout

Conversation

@ckipp01

@ckipp01 ckipp01 commented May 6, 2023

Copy link
Copy Markdown
Owner

Trying out oyvindberg/jatatui#50.

@ckipp01 ckipp01 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall @oyvindberg I really like this diff. There are a couple small things that I pointed out, but overall I like it. One other thing I noticed is that something seems to be up with the highlightStyle on the selected item in the ListWidget as it's not working for me now. I need to try and dig in further to see why that's no longer working.

Comment thread skan/src/ui/Board.scala
title = Some(todoBorderTitle)
)(
ListWidget(
items = todoItems.map(item => toListItem(item, area.width)),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another interesting one @oyvindberg that maybe I'm just using the area.width when I should instead be using something else, but I want it to know how much space to put between the title the date for one to be left aligned and the other right aligned on the same line. In order to achieve that I need to know how wide the widget will be. So I can wrap it in a Widget, but idn, sort of stinks that I need to do that. Maybe it's fine, idn. Thinking about it, with the cursor example it'd be fine to get it after I put the layout together, but here it's sort of a chicken and the egg problem.

Comment thread skan/src/ui/NewItem.scala
Comment on lines +48 to +59
frame.setCursor(
x = area.x + Grapheme(state.description).width + 1,
y = area.y + 1
)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is what I was referring to on the other PR, it's a but of a bummer since I only need to do this when I'm on the description and in input mode, but still need to wrap it in a Widget even when it's not that. It's not the worst, but yea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant