flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-38050][UI] Correct Flink UI Dropdown Width

Open nishita-09 opened this issue 5 months ago • 4 comments

What is the purpose of the change

Currently, the dropdown to add a metric for an operator, under the metrics section, has a fixed width. This makes it difficult for the user to read the metric names and they all look the same. Hence we have made the width of dropdown menu a function of the parent component width and the metricNames that are to be shown in the UI.

(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)

Brief change log

  1. Dynamic Dropdown Width
  • The dropdown width is now dynamically calculated based on the longest metric name using getBoundingClientRect().width for accurate measurement.
  • Padding is minimized for a tighter fit.
  1. NG-ZORRO Select Enhancements
  • The dropdown is rendered with nzSize="small" for a compact appearance.
  • The dropdown panel width is no longer forced to match the select box, thanks to nzDropdownMatchSelectWidth="false".
  • Custom styles are applied to the dropdown panel using [nzDropdownStyle] for minimum and maximum width control.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

  • npm run proxy helped with validating the changes made

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): No
  • The public API, i.e., is any changed class annotated with @Public(Evolving): No
  • The serializers: No
  • The runtime per-record code paths (performance sensitive): No
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: No
  • The S3 file system connector: No

Documentation

  • Does this pull request introduce a new feature? No
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

nishita-09 avatar Jul 08 '25 14:07 nishita-09

CI report:

  • ae13c1566bf144b949d39ab07c9d43eb5aa251a6 UNKNOWN
  • 710f24753fb9797866ae3e8d54595f22e1be858b Azure: FAILURE
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Jul 08 '25 14:07 flinkbot

@flinkbot run azure

nishita-09 avatar Jul 08 '25 14:07 nishita-09

Hey @nishita-09, thanks for your contribution! It would be nice to have this fixed. I like the approach and I've left some comments. Also, can you take a look at the CI and make it green?

Fyi, I'll be out for two weeks. It'd be great if someone with some context could also take a look in the meantime.

Sure @gustavodemorais , if you know of someone kindly do tag them here to take this forward. In the meanwhile, I can address your comments.

nishita-09 avatar Jul 09 '25 16:07 nishita-09

@flinkbot run azure

nishita-09 avatar Jul 09 '25 19:07 nishita-09