yari icon indicating copy to clipboard operation
yari copied to clipboard

Content bug: File.size (File API) is not on the sidebar

Open ADTC opened this issue 4 years ago • 8 comments

What page(s) did you find the problem on?

https://developer.mozilla.org/en-US/docs/Web/API/File/size https://developer.mozilla.org/en-US/docs/Web/API/File

Specific page section or heading?

(Sidebar) Related Topics > Properties image

What is the problem?

The sidebar doesn't have a link to the size property.

What did you expect to see?

The sidebar has a link to the size property.

Did you test this? If so, how?

I checked the File API specification. The size property is listed under Instance properties as File.prototype.size.

ADTC avatar Sep 24 '21 01:09 ADTC

That's because File.size is in fact defined on Blob. That page should be a redirect to Blob.size. I agree that inherited properties/methods are a bit hidden, though.

teoli2003 avatar Sep 24 '21 04:09 teoli2003

To make it appear on the sidebar, we should modify the macro. @Elchi3, @wbamberg, @rumyra: do you think we should?

teoli2003 avatar Sep 24 '21 05:09 teoli2003

To make it appear on the sidebar, we should modify the macro. @Elchi3, @wbamberg, @Rumyra: do you think we should?

Friendly ping to @Rumyra for your thoughts on this issue. Thank you.

schalkneethling avatar Jun 16 '22 16:06 schalkneethling

I think this is a good issue to address with the work (and discussion) around page types, organising web apis and that sidebar work - I haven't made a decision, but the options are:

  • Add to sidebar for clarity now
  • Wait until the above work is done because it should be addressed

Rumyra avatar Jun 17 '22 11:06 Rumyra

@teoli2003 Thoughts on the above?

schalkneethling avatar Jun 21 '22 19:06 schalkneethling

I don't think the current sidebar system allows for adding it to the sidebar. (Without a significant revamp). It just doesn't list inherited properties and methods, only a link to the inherited interfaces.

So this will need to wait for engineering time to move the sidebars from macros to yari (using page-type, etc), I guess.

teoli2003 avatar Jun 22 '22 05:06 teoli2003

I don't think the current sidebar system allows for adding it to the sidebar. (Without a significant revamp). It just doesn't list inherited properties and methods, only a link to the inherited interfaces.

So this will need to wait for engineering time to move the sidebars from macros to yari (using page-type, etc), I guess.

Does it then make more sense to move this to Yari?

schalkneethling avatar Jun 22 '22 11:06 schalkneethling

I don't think the current sidebar system allows for adding it to the sidebar. (Without a significant revamp). It just doesn't list inherited properties and methods, only a link to the inherited interfaces. So this will need to wait for engineering time to move the sidebars from macros to yari (using page-type, etc), I guess.

Does it then make more sense to move this to Yari?

Either way this is a Yari bug, since sidebars are implemented in KS now, and that is in Yari.

wbamberg avatar Jun 22 '22 18:06 wbamberg

To show inherited properties (and methods!?) in the APIRef sidebar, we can use the same data source as the InheritanceDiagram macro (i.e. the InterfaceData.json).

Requirements:

  1. Show all inherited properties and methods in the sidebar, unless they are overridden (e.g. Blob.type -> File.type).
  2. Make them distinguishable (since navigating to an inherited property or method will lead to a different sidebar).

caugner avatar Nov 11 '22 15:11 caugner