Skip to content

Conversation

@vrn21
Copy link
Contributor

@vrn21 vrn21 commented Mar 16, 2025

Changes I've made is for accommodating loong location names; ive changed the .. to the long name; it widens the task rectangle if its longer than the default (50%) and goes to the next line if its longer than what we can accommodate in a single line. This fixes issue #523 have attached screenshots of the same in the PR, before and after changes

These screenshots are what was the UI before my changes.
Screenshot 2025-03-16 at 4 15 10 PM

and these are the screenshots after my changes.
Screenshot 2025-03-16 at 4 14 25 PM
Screenshot 2025-03-16 at 4 14 19 PM
Screenshot 2025-03-16 at 4 14 15 PM

Changes i've made is for accomadating loong location names, ive changed the ... to the long name, it widens the task rectangle if its longer than the default 50% and goes to the next line if its longer than we can accomadate in a single line. This fixes issue tokio-rs#523
i have attached screenshots of the same in the PR, before and after changes
@vrn21 vrn21 requested a review from a team as a code owner March 16, 2025 10:53
@hds
Copy link
Collaborator

hds commented Mar 17, 2025

@vrn21 Thanks for working on this topic! So far this PR looks good. However, with a fixed number of rows, when you go to 2 lines for the location text, the "Idle" time is getting dropped off, so that needs to be resolved too. I think that there are some hints in the original issue regarding how to approach that issue.

@vrn21
Copy link
Contributor Author

vrn21 commented Mar 19, 2025

Thank you for looking into this @hds and Sorry for the delay,

but i'm still not sure how i'm supposed to move forward with this, i cant really determine what the height of the task_area is, before hand as in the current code, number of lines extra needed can be only computed after the each of the constraint is set. Could you help on this?

@hds
Copy link
Collaborator

hds commented Mar 19, 2025

In the code that exists, the areas are computed up front, based on the constraints provided. However, those areas aren't actually used until the Paragraph for each of the task overview and the waker stats are actually rendered at the bottom.

If the creation of the task and waker "widgets" (that's the variable name), is performed before the area is split on constraints, then we can already compute the number of lines that each one needs and use that as input to the Constraints::Length for the stats_area which is where they sit.

Does that help?

…ask details screen

I've made the logic to look whether Location is longer than a single viewable length, even before setting constraints both vertically and horizontally. This fixes issue tokio-rs#523
@vrn21
Copy link
Contributor Author

vrn21 commented Mar 21, 2025

Sorry again for the delay, Does this work @hds?

I've changed the logic to check whether locations is longer than what is viewable in a single line, before hand, assigning constraints (both vertical and horizontal) afterwards.
Screenshot 2025-03-21 at 7 42 09 PM
Screenshot 2025-03-21 at 7 41 27 PM

@hds
Copy link
Collaborator

hds commented Mar 22, 2025

This is looking good! There are a few style and layout things, but the functionality appears correct. I'll get you a proper review of this on Monday.

Thanks for your work!

Copy link
Collaborator

@hds hds left a comment

Choose a reason for hiding this comment

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

This is looking good, thanks! There are some changes I've suggested.

@vrn21
Copy link
Contributor Author

vrn21 commented Mar 24, 2025

@hds i've made the changes you've told to

Copy link
Collaborator

@hds hds left a comment

Choose a reason for hiding this comment

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

One point here where I think I wasn't clear regarding what I meant. And one other thing that I didn't notice before, sorry about that.

please refer to earlier commits to see what changes have been made
@vrn21
Copy link
Contributor Author

vrn21 commented Mar 24, 2025

@hds i've updated the latest changes requested

@vrn21 vrn21 requested a review from hds March 25, 2025 06:46
long var names changed to shorter names

Co-authored-by: Hayden Stainsby <[email protected]>
Copy link
Collaborator

@hds hds left a comment

Choose a reason for hiding this comment

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

What about this idea?

@vrn21
Copy link
Contributor Author

vrn21 commented Mar 27, 2025

Sorry for the delay again!

Yes, you're right, we could remove that unecessary if block. This doesnt really affect the view.

Attaching the current versions:

Screenshot 2025-03-28 at 12 22 20 AM Screenshot 2025-03-28 at 12 22 34 AM Screenshot 2025-03-28 at 12 22 46 AM Screenshot 2025-03-28 at 12 23 47 AM Screenshot 2025-03-28 at 12 29 41 AM

I'm commiting the changes( removing if block), i dont think this has any other problems with it.

@vrn21
Copy link
Contributor Author

vrn21 commented Mar 30, 2025

@hds seems fine?

Copy link
Collaborator

@hds hds left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you for all your work on this issue!

@hds hds changed the title bug: dynamic alloc of layout constraints in task details screen fix: add dynamic constraints layout in task details screen Mar 31, 2025
@hds hds changed the title fix: add dynamic constraints layout in task details screen fix(console): add dynamic constraints layout in task details screen Mar 31, 2025
@hds hds merged commit ada7dab into tokio-rs:main Mar 31, 2025
19 checks passed
@github-actions github-actions bot mentioned this pull request Jan 22, 2025
hds pushed a commit that referenced this pull request Oct 29, 2025
…onsole-v0.1.14

# console-api

## 0.9.0 - (2025-10-29)

### <a id = "0.9.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))

### Fixed

- Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592))

### Updated

- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# console-subscriber

## 0.5.0 - (2025-10-29)

### <a id = "0.5.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Documented

- Fix typo in doc comment ([3dbca7a](3dbca7a))

### Updated

- [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# tokio-console

## 0.1.14 - (2025-10-29)

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Fixed

- Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523))

### Updated

- Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- Upgrade tonic to 0.14 ([#645](#645))
hds pushed a commit that referenced this pull request Oct 29, 2025
…onsole-v0.1.14

# console-api

## 0.9.0 - (2025-10-29)

### <a id = "0.9.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))

### Fixed

- Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592))

### Updated

- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# console-subscriber

## 0.5.0 - (2025-10-29)

### <a id = "0.5.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Documented

- Fix typo in doc comment ([3dbca7a](3dbca7a))

### Updated

- [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# tokio-console

## 0.1.14 - (2025-10-29)

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Fixed

- Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523))

### Updated

- Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- Upgrade tonic to 0.14 ([#645](#645))
hds pushed a commit that referenced this pull request Oct 30, 2025
…onsole-v0.1.14

# console-api

## 0.9.0 - (2025-10-30)

### <a id = "0.9.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))

### Fixed

- Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592))

### Updated

- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# console-subscriber

## 0.5.0 - (2025-10-30)

### <a id = "0.5.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Documented

- Fix typo in doc comment ([3dbca7a](3dbca7a))

### Updated

- [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# tokio-console

## 0.1.14 - (2025-10-30)

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Fixed

- Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523))

### Updated

- Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- Upgrade tonic to 0.14 ([#645](#645))
hds pushed a commit that referenced this pull request Oct 30, 2025
…onsole-v0.1.14 (#648)

# console-api

## 0.9.0 - (2025-10-30)

### <a id = "0.9.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))

### Fixed

- Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592))

### Updated

- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# console-subscriber

## 0.5.0 - (2025-10-30)

### <a id = "0.5.0-breaking"></a>Breaking Changes
- **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.12.x.
- **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and
`console-subscriber`, as it changes the public `tonic` dependency
to a semver-incompatible version. This breaks compatibility with
`tonic` 0.13.x.

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Documented

- Fix typo in doc comment ([3dbca7a](3dbca7a))

### Updated

- [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645))

# tokio-console

## 0.1.14 - (2025-10-30)

### Added

- Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2))
- Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a))
- Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee))

### Fixed

- Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523))

### Updated

- Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd))
- Upgrade tonic to 0.14 ([#645](#645))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants