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

Word Export: Add missing Before/After/Between content #155

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

mark-sil
Copy link
Contributor

@mark-sil mark-sil commented Sep 4, 2024

  • Add between content for CrossRreference types.
  • Add before and after content for LexicalRelations->Targets.

Note: I think passing child to AddCollection() is the correct node for the collection being added. The other implementations of AddCollection() do not use this parameter so they are not affected.

This fixes one of the issues identified in LT-21808.


This change is Reviewable

- Add between content for CrossRreference types.
- Add before and after content for LexicalRelations->Targets.

Note: I think passing child to AddCollection() is the correct
node for the collection being added. The other implementations
of AddCollection() do not use this parameter so they are not
affected.
This fixes one of the issues identified in LT-21808.

Change-Id: I15e621b70f0fe278051e9b922925ecb1373fb333
Copy link
Contributor

@JakeOliver28 JakeOliver28 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @mark-sil)


Src/xWorks/ConfiguredLcmGenerator.cs line 2008 at r1 (raw file):

			// Now that we have things in the right order, try outputting one type at a time
			bool first = true;

Could we call this firstIteration or isFirstIteration? Took me a second to figure out the purpose/meaning of this variable. And same thing for the parameter first in all the BetweenCrossReferenceType methods.


Src/xWorks/LcmJsonGenerator.cs line 414 at r1 (raw file):

		}

		public void BetweenCrossReferenceType(IFragment content, ConfigurableDictionaryNode node, bool first)

Is this method necessary? We just implement it because of the method being added to the interface, correct? Do we need to add the method to the interface, or could we only implement it in the class that uses it?

@JakeOliver28 JakeOliver28 enabled auto-merge (squash) September 4, 2024 16:48
- Add between content for CrossRreference types.
- Add before and after content for LexicalRelations->Targets.

Note: I think passing child to AddCollection() is the correct
node for the collection being added. The other implementations
of AddCollection() do not use this parameter so they are not
affected.
This fixes one of the issues identified in LT-21808.

Change-Id: I2bfbea70752fb0acfdd98d550753256b54783e33
Copy link
Contributor Author

@mark-sil mark-sil left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @JakeOliver28)


Src/xWorks/ConfiguredLcmGenerator.cs line 2008 at r1 (raw file):

Previously, JakeOliver28 (Jake Oliver) wrote…

Could we call this firstIteration or isFirstIteration? Took me a second to figure out the purpose/meaning of this variable. And same thing for the parameter first in all the BetweenCrossReferenceType methods.

I change the name based on the context. Sometimes firstIteration and sometimes firstItem.


Src/xWorks/LcmJsonGenerator.cs line 414 at r1 (raw file):

Previously, JakeOliver28 (Jake Oliver) wrote…

Is this method necessary? We just implement it because of the method being added to the interface, correct? Do we need to add the method to the interface, or could we only implement it in the class that uses it?

The caller doesn't know that it is calling a LcmWordGenerator, All it knows is that it is calling some type of ILcmContentGenerator, so to continue with the existing pattern we need to use the interface.

Copy link
Contributor

@JakeOliver28 JakeOliver28 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions

@JakeOliver28 JakeOliver28 merged commit a021c71 into release/9.1 Sep 4, 2024
4 of 5 checks passed
@JakeOliver28 JakeOliver28 deleted the BefAftBet2 branch September 4, 2024 18:14
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.

2 participants