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

Fix LT-21797: Missing highlights in Analyze tab #61

Merged
merged 1 commit into from
May 24, 2024

Conversation

jtmaxwell3
Copy link
Collaborator

@jtmaxwell3 jtmaxwell3 commented May 22, 2024

Implementing LT-21777 (Mark guessed analyses in InterlinearExport) broke the highlighting in the interlinear display because the extra AddProp threw the display code off. I changed the code to mark the guessed analysis using set_StringProp instead, which required me to implement set_StringProp in CollectorEnv.


This change is Reviewable

Copy link
Contributor

@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 3 files reviewed, 1 unresolved discussion (waiting on @jtmaxwell3)


Src/Common/RootSite/CollectorEnv.cs line 96 at r1 (raw file):

			public int m_ihvo;
			/// <summary>String properties of the current item</summary>
			public Dictionary<int, string> m_stringProps;

Are you intending to make additional changes that will take advantage of the Dictionaries that are declared here and at line 342? If not, then it is not clear to me why we are using Dictionaries. Can you accomplish the same thing with a tagAnalysisStatus bool or enum?

Code quote:

Dictionary<int, string> m_stringProps;

@jtmaxwell3
Copy link
Collaborator Author

CollectorEnv is used by multiple clients. None of them currently make use of set_StringProp, but I figured that as long as I was going to implement that function, I should implement it for the general case and not just for InterlinearExplorer's current need. In the general case, set_StringProp could be called multiple times before the next AddObj, so it seemed appropriate to use a Dictionary for the properties.

Copy link
Contributor

@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.

I didn't think other clients were calling into Fieldworks code. Do you mean multiple derived classes?

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @jtmaxwell3)

@jtmaxwell3
Copy link
Collaborator Author

I'm not sure what you mean by multiple derived classes. I meant that CollectorEnv is used by ConfiguredExport, ItemsCollectorEnv, FindCollectorEnv, and DiscourseExporter in addition to InterlinearExporter. The original comment on set_StringProp said "Nothing to do here. None of our collectors cares about string properties (yet)", so I wanted to future-proof my change.

Copy link
Contributor

@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.

Yes, those look like derived classes. I tend toward simplifying until needed but your reasoning makes sense. LGTM.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jtmaxwell3)

Copy link
Contributor

@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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jtmaxwell3)

@jasonleenaylor jasonleenaylor merged commit 1a15578 into release/9.1 May 24, 2024
5 checks passed
@jasonleenaylor jasonleenaylor deleted the LT-21797 branch May 24, 2024 20:06
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.

3 participants