Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SITO] File format for situation objects - New #380

Merged
merged 17 commits into from
Aug 25, 2022
Merged

Conversation

micotto
Copy link
Contributor

@micotto micotto commented Jul 21, 2022

No description provided.

@micotto micotto changed the title Initial object upload [SITO] File format for situation objects - New Jul 21, 2022
Copy link
Contributor

@schneidermic0 schneidermic0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @micotto. I had a first look at your pull request. I think there are a lot of improvements compared to #364. 👍

I went through the proposal (I put focus on the example in the first step) and added a bunch of questions, comments and suggestions.

I guess there will be more in further iterations. This file format definition is one of the largest so far. ;)

file-formats/sito/examples/zmo_sito_test.sito.json Outdated Show resolved Hide resolved
file-formats/sito/examples/zmo_sito_test.sito.json Outdated Show resolved Hide resolved
file-formats/sito/examples/zmo_sito_test.sito.json Outdated Show resolved Hide resolved
],
"structureSemanticKey": [
{
"fieldOrder": "02",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the field fieldOrder represent the order of semantic keys? This seems to be similar to the discussion of order of db table fields for indexes. There we take the approach to not specify an order field. The order is specified by the order of entries in the array.

Relates to #176

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field Order is used to set the order for the concatenation of keys for the semantic key. It is a critical information. If the explicit definition of the field order is removed and the order is just defined by the implicit order of the fields in the array, a user could miss the necessity/importance of that order. Without the explizit field order definition it just looks like an array of keys where the order does not matter!

file-formats/sito/examples/zmo_sito_test.sito.json Outdated Show resolved Hide resolved
Copy link
Contributor

@schneidermic0 schneidermic0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We suggest to write titles/shorttexts in title case and descriptions in ABAPdoc comments in standard sentence case.

Comment on lines 33 to 34
"! <p class="shorttext">In Memory</p>
"! In Memory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, the tile stays in title case. The descriptions below are in standard sentence case.

Suggested change
"! <p class="shorttext">In Memory</p>
"! In Memory
"! <p class="shorttext">In Memory</p>
"! In memory

This seems to be the case for almost all descriptions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapted for all descriptions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapted for all descriptions

It seems not to be fixed, yet.

@cla-assistant
Copy link

cla-assistant bot commented Jul 26, 2022

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Jul 26, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ schneidermic0
✅ micotto
❌ tobiasmuench
You have signed the CLA already but the status is still pending? Let us recheck it.

@micotto
Copy link
Contributor Author

micotto commented Jul 26, 2022

We went through all review comments. For some, files/code were adapted. Others we would like to clarify. Please see our comments above.

@schneidermic0
Copy link
Contributor

We went through all review comments. For some, files/code were adapted. Others we would like to clarify. Please see our comments above.

Shall we already review your changes? Or shall we wait until you clarified the other points?

Copy link
Contributor

@schneidermic0 schneidermic0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't change this file by intension, did you?

docs/json.md Outdated Show resolved Hide resolved
@tobiasmuench
Copy link
Contributor

tobiasmuench commented Jul 27, 2022

image
Regarding the two different versions of header type, ty_header_60 and ty_header_60_cloud.
ADT tooling as of my knowledge is ABAP Langeuage Version space (SAP Development) and 5 (Customer Development) only. ABAP Language Version 2 (Key User Extensibility) is reserved for Fiori UIs.

Why do we have to chose the one or other type? What impact does it have or should we clarify this with our cloud enablement coach? (Currently we got no further feedback from him about open tasks regarding Cloud Enablement.) We do offer Fiori tools for ABAP Language Version 2 already and are now building ADT to cover the other dev scenarios.

Summary..: YES, Situation Objects (as well as Situation Scenarios and Templates) are subject to Key User Extensibility and Fiori Apps for ABAP Language Version 2 are already delivered.
Thus I expect TYPE zif_aff_types_v1=>ty_header_60 is relevant for us!

@tobiasmuench
Copy link
Contributor

@schneidermic0
We consider our input now as final, subject for final review!
Only recommendation that we didn't follow is the field order, see explanation above.

@schneidermic0 schneidermic0 self-requested a review July 28, 2022 08:24
"! $required
type TYPE ty_sit2_do_vh_type,
"! <p class="shorttext">Scope</p>
"! Source
Copy link

@marcushoepfner marcushoepfner Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field is named "scope", while description says "Source". Is this correct?
I wonder since "scope" might mean "source" as well, but also has other meanings.

for me both are fine, just wanted to point you to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be changed to "SCOPE" entirely!

Copy link
Contributor

@wurzka wurzka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puh, a very long type. I have to admit that I have lost track a bit... However, my review is focused on the titles and descriptions. These are only suggestions. It's up to you if you want to implement them

file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
Copy link
Contributor

@schneidermic0 schneidermic0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@micotto and @tobiasmuench: Thanks. Good progress!

We added a lot of feedback (most of them are minor changes due to inconsistencies in titles and descriptions).

Maybe it make sense to talk about following general remarks/ideas in a call/meeting:

  • Order of fields in structures (especially for required and boolean fields)
  • Reuse of types
  • Field field_order in semantic keys

file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved
Comment on lines 33 to 34
"! <p class="shorttext">In Memory</p>
"! In Memory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapted for all descriptions

It seems not to be fixed, yet.

Comment on lines 4 to 5
"! <p class="shorttext">SIT2_DO_SCOPE</p>
"! SIT2_DO_SCOPE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Do you need the DDIC types, here? At leaset for the title (shorttext) I would remove them.

There are several places

@SAP/abap-file-formats-team Can we handle @links in the description of ABAP doc? If yes, they could add a link to the ddic type by adding {@link SIT2_DO_SCOPE}. This would be helpful in ADT's element info. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what is meant here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess @schneidermic0 suggests to remove at least the titles which only consist of the DDIC types. Do you need these DDIC types here?

About the @link: I tried to add a link to SIT2_DO_SCOPE in the description. It does not work.

So for you @micotto:
If you need the DDIC type information here, you can think about having it only in the description, i.e. remove the "shorttext"`s (here and for the types and constants below).

If you don't need the information, I would remove it.

file-formats/sito/type/zif_aff_sito_v1.intf.abap Outdated Show resolved Hide resolved

"! <p class="shorttext">Semantic Keys</p>
"! Semantic keys of an object structure
ty_sit2_obj_str_sk_list TYPE STANDARD TABLE OF ty_sit2_obj_str_sk WITH DEFAULT KEY,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to keep the field field_order, should the entries be sorted by the field_order?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the moment, we are fine with keeping field field_order, based on standard table
(we tried to use sorted table, but we obtain a syntax error in if_aff_sito_v1)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to have a sorted table, it should be possible to have it like

Suggested change
ty_sit2_obj_str_sk_list TYPE STANDARD TABLE OF ty_sit2_obj_str_sk WITH DEFAULT KEY,
ty_sit2_obj_str_sk_list TYPE SORTED TABLE OF ty_sit2_obj_str_sk WITH UNIQUE KEY field_order,

@tobiasmuench
Copy link
Contributor

Draft of user story:
https://jira.tools.sap/browse/SITUATIONS-3679

@tobiasmuench
Copy link
Contributor

tobiasmuench commented Aug 9, 2022

  • Order of fields in structures (especially for required and boolean fields)

Order of fields is definitely important and will be fixed!

Order proposal:

  • Id
  • Name
  • Type
  • Reusable
  • Scope
  • SAP object node type
  • .... sonstige nodes ...

@micotto
Copy link
Contributor Author

micotto commented Aug 22, 2022

Hi colleagues,
thank you for your thorough review.
We tried to address all of your comments. Regarding field "field_order", we kept it since we believe it is important to make it explicit for the user.

@wurzka
Copy link
Contributor

wurzka commented Aug 23, 2022

Thanks for your update @micotto. I am taking over for @schneidermic0.
But before I start my review, could you please mark our suggestions either as "resolved" or put a comment if or if not you adopted our suggestions? This makes my review quite easier since I do not have to ask if you thought about these suggestions. Thanks :)

@micotto
Copy link
Contributor Author

micotto commented Aug 23, 2022

Hi @wurzka. I went through the review comments once more and adapted everything which was missing. With a few exceptions (where I put comments), all suggestions are resolved now.

Copy link
Contributor

@wurzka wurzka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your update. I added two comments. Please give a short feedback whether you want to do any of the changes.

Comment on lines 4 to 5
"! <p class="shorttext">SIT2_DO_SCOPE</p>
"! SIT2_DO_SCOPE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess @schneidermic0 suggests to remove at least the titles which only consist of the DDIC types. Do you need these DDIC types here?

About the @link: I tried to add a link to SIT2_DO_SCOPE in the description. It does not work.

So for you @micotto:
If you need the DDIC type information here, you can think about having it only in the description, i.e. remove the "shorttext"`s (here and for the types and constants below).

If you don't need the information, I would remove it.


"! <p class="shorttext">Semantic Keys</p>
"! Semantic keys of an object structure
ty_sit2_obj_str_sk_list TYPE STANDARD TABLE OF ty_sit2_obj_str_sk WITH DEFAULT KEY,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to have a sorted table, it should be possible to have it like

Suggested change
ty_sit2_obj_str_sk_list TYPE STANDARD TABLE OF ty_sit2_obj_str_sk WITH DEFAULT KEY,
ty_sit2_obj_str_sk_list TYPE SORTED TABLE OF ty_sit2_obj_str_sk WITH UNIQUE KEY field_order,

@micotto
Copy link
Contributor Author

micotto commented Aug 25, 2022

We'll do both suggested changes.
Regarding the DDIC types, by "removing title" do you mean keeping a line such as no. 4 with empty title or deleting the complete line ?
Also, does your suggestion apply to the TYPES-statements only, or to the CONSTANTS-statements as well ?

@wurzka
Copy link
Contributor

wurzka commented Aug 25, 2022

I suggest deleting the complete line s.t. there is only line

"! SIT2_DO_SCOPE

I would remove these titles also for the constants.

@micotto
Copy link
Contributor Author

micotto commented Aug 25, 2022

Both suggested changes were carried out.
In addition, we had to change two entities from array to item (plus one tiny change were a plural was missing.)

Copy link
Contributor

@wurzka wurzka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good to me, now. I think we can merge the pull request.

@wurzka wurzka dismissed schneidermic0’s stale review August 25, 2022 14:39

Not available to review again. Review was taken over by myself.

@wurzka wurzka merged commit 843a9d4 into SAP:main Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants