-
-
Notifications
You must be signed in to change notification settings - Fork 163
fix(console): add dynamic constraints layout in task details screen #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 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. |
|
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? |
|
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 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 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
|
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. |
|
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! |
There was a problem hiding this 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.
|
@hds i've made the changes you've told to |
There was a problem hiding this 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
|
@hds i've updated the latest changes requested |
long var names changed to shorter names Co-authored-by: Hayden Stainsby <[email protected]>
There was a problem hiding this 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?
|
@hds seems fine? |
There was a problem hiding this 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!
…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))
…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))
…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))
…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>







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.

and these are the screenshots after my changes.


