Closed gregorwolf closed 1 year ago
Suggested solution: Annotate the <PropertyValue Property="Url">
with the new term HTML5.LinkTarget
proposed in #260.
Hi @gregorwolf , first of all thanks for bringing up the idea! Nevertheless I feel ambiguous with regards to this request. Let me explain why:
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
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
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.
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
The current proposed annotation is a general mechanism to annotate a URL with a target. Are you OK with that, @BerSie?
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 :-)
@gregorwolf, how would you generate the new annotation in your application?
My main focus is CAP.
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