SAP / odata-vocabularies

SAP Vocabularies for semantic markup of structured data published via OData (www.odata.org) services.
https://sap.github.io/odata-vocabularies
Apache License 2.0
166 stars 62 forks source link

Missing Property "target" for DataFieldWithUrl #259

Closed gregorwolf closed 1 year ago

gregorwolf commented 1 year ago

Hello SAP OData Vocabularies Team,

right now the UI Annotation DataFieldWithUrl doesn't have a Property "target" that could be used to define if the link is opened in a new window or tab (https://www.w3schools.com/tags/att_a_target.asp). The UI5 control sap.m.Link does provide this Property.

Best Regards Gregor

HeikoTheissen commented 1 year ago

Suggested solution: Annotate the <PropertyValue Property="Url"> with the new term HTML5.LinkTarget proposed in #260.

BerSie commented 1 year ago

Hi @gregorwolf , first of all thanks for bringing up the idea! Nevertheless I feel ambiguous with regards to this request. Let me explain why:

gregorwolf commented 1 year ago

Hi @HeikoTheissen,

thank you for the quick action. Will your suggested solution then already work with Fiori Elements using OData v4 or is there adjustments in SAPUI5 also needed?

Best Regards Gregor

BerSie commented 1 year ago

Hi @gregorwolf, I would not expect that changes in UI5 core are necessary, but Fiori Elements v4 has to react accordingly to this new annotation. Best regards, Bernhard

HeikoTheissen commented 1 year ago

Hi @gregorwolf , first of all thanks for bringing up the idea! Nevertheless I feel ambiguous with regards to this request. Let me explain why:

  • the terms and its properties within the UI vocabulary, although UI oriented, should have a certain level of semantic abstraction (I know we have good and bad examples for that). So, besides the fact that "target" wouldn't nicely fit to the property target that's already used within DataFieldWithNavigationPath or DataFieldForAnnotation, I struggle with a semantic description of such a property. So, maybe you have a good idea for that.
  • having said that we have a vocabulary which lacks these semantics by intent - the HTML vocabulary. Maybe that would be a place for such a term/property, if there is simply no further semantics behind.
  • a case of personal preference: I don't like websites that open other things automatically in new tabs/windows - I (as an end user) always want to have the chance to decide if I want to open it in a tab or not
  • a case of vulnerability - the target site is able to tweak the history, so it controls the back navigation: https://bughunters.google.com/learn/invalid-reports/web-platform/navigation/5825028803002368/phishing-by-navigating-browser-tabs Ok - while writing all this (which took longer than I originally thought) @HeikoTheissen, already created a proposal ... let's see how this moves ...

@gregorwolf, can you reply to these questions? I would like them clarified before we merge the PR.

gregorwolf commented 1 year ago

HI @HeikoTheissen,

as none of the points contained a question mark I have not thought that you need any further input from my side. I think the extensions in the PR #260 should fulfil our needs.

Best Regards Gregor

HeikoTheissen commented 1 year ago

The current proposed annotation is a general mechanism to annotate a URL with a target. Are you OK with that, @BerSie?

BerSie commented 1 year ago

Hi @HeikoTheissen, you made my first two points obsolete by using the HTML vocabulary. And a colleague of mine made me aware that there is a solution for my fourth point available (for those that are interested: https://me.sap.com/notes/0003014875). So, there is in the end only the third point left, which is more or less my personal gut feeling. Although this one remains, it's not a valid reason to decline the request :-)

HeikoTheissen commented 1 year ago

@gregorwolf, how would you generate the new annotation in your application?

gregorwolf commented 1 year ago

My main focus is CAP.