Skip to content
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

[ENHANCEMENT] TracingGanttChart: align span duration label location based on available space #2348

Conversation

andreasgerstmayr
Copy link
Contributor

Description

TracingGanttChart: align span duration label location based on available space. Show the label on the left side if there is no space on the right side.

Additionally, set a min-width of 2px for the span bar, otherwise span bars with very small durations would be invisible.

Screenshots

The span duration label of the pink bar is shown on the left side, because there is no space on the right side:
image

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • Visual tests are stable and unlikely to be flaky.
    See Storybook
    and e2e docs for more details. Common issues
    include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

…ased on available space

Show the label on the left side if there is no space on the right side.

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Copy link
Member

@Gladorme Gladorme left a comment

Choose a reason for hiding this comment

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

Nice!

@andreasgerstmayr andreasgerstmayr added this pull request to the merge queue Oct 16, 2024
Merged via the queue into perses:main with commit 5b132d5 Oct 16, 2024
18 checks passed
@andreasgerstmayr andreasgerstmayr deleted the gantt-chart-span-duration-label-side branch October 16, 2024 15:52
ibakshay pushed a commit to ibakshay/perses that referenced this pull request Oct 21, 2024
…ased on available space (perses#2348)

Show the label on the left side if there is no space on the right side.

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Signed-off-by: Akshay Iyyadurai Balasundaram <akshay.iyyadurai.balasundaram@sap.com>
ibakshay pushed a commit to ibakshay/perses that referenced this pull request Oct 21, 2024
…ased on available space (perses#2348)

Show the label on the left side if there is no space on the right side.

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.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