Repository: electron/electron (language: cpp)

Issue:
[Feature Request]: Expose Display label property
### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

In line with #6899 and #25252 I would like request support for getting the display label. It looks like chromium provides a "User-friendly label, determined by the platform." that isn't currently used by electron.

https://chromium.googlesource.com/chromium/src/+/master/ui/display/display.h

### Proposed Solution

Based off of similar previous accepted changes I think these are the edits necessary:

In gfx_converter.cc line 147:
`dict.Set("label", val.label());`

In api-screen-spec.ts line 37:
`expect(display).to.have.property('label').that.is.a('string');`

And finally in the docs display.md line 4:
`* `label` string - User-friendly label, determined by the platform.`

### Alternatives Considered

No alternatives necessary.

### Additional Information

I would be happy to contribute the changes myself, but I am a little confused by the contribution workflow and unfortunately I couldn't get a successful build using the build-tools.


Discussion / hints:

Fix patch:
diff --git a/docs/api/structures/display.md b/docs/api/structures/display.md
index 8782d34d1b46b..37dfa26b7ae32 100644
--- a/docs/api/structures/display.md
+++ b/docs/api/structures/display.md
@@ -1,6 +1,7 @@
 # Display Object
 
 * `id` number - Unique identifier associated with the display.
+* `label` string - User-friendly label, determined by the platform.
 * `rotation` number - Can be 0, 90, 180, 270, represents screen rotation in
   clock-wise degrees.
 * `scaleFactor` number - Output device's pixel scale factor.
diff --git a/shell/common/gin_converters/gfx_converter.cc b/shell/common/gin_converters/gfx_converter.cc
index 23c7d873893db..4fc3294323f78 100644
--- a/shell/common/gin_converters/gfx_converter.cc
+++ b/shell/common/gin_converters/gfx_converter.cc
@@ -144,6 +144,7 @@ v8::Local<v8::Value> Converter<display::Display>::ToV8(
   gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(isolate);
   dict.SetHidden("simple", true);
   dict.Set("id", val.id());
+  dict.Set("label", val.label());
   dict.Set("bounds", val.bounds());
   dict.Set("workArea", val.work_area());
   dict.Set("accelerometerSupport", val.accelerometer_support());
diff --git a/spec/api-screen-spec.ts b/spec/api-screen-spec.ts
index 102e68155d28b..2f6631e454c4b 100644
--- a/spec/api-screen-spec.ts
+++ b/spec/api-screen-spec.ts
@@ -34,6 +34,7 @@ describe('screen module', () => {
 
       expect(display).to.have.property('scaleFactor').that.is.a('number');
       expect(display).to.have.property('id').that.is.a('number');
+      expect(display).to.have.property('label').that.is.a('string');
       expect(display).to.have.property('rotation').that.is.a('number');
       expect(display).to.have.property('touchSupport').that.is.a('string');
       expect(display).to.have.property('accelerometerSupport').that.is.a('string');


Test patch: