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

Open collection JSON file in text editor #2381

Merged
merged 5 commits into from
Dec 16, 2024
Merged

Conversation

erri120
Copy link
Member

@erri120 erri120 commented Dec 12, 2024

Adds a menu item to open the collection JSON file in a text editor (read-only). Allows us to better debug collection issues.

Part of #2254.

Also documents and adds some more JSON properties.

@erri120 erri120 requested a review from a team December 12, 2024 13:25
@erri120 erri120 self-assigned this Dec 12, 2024
@Pickysaurus
Copy link
Contributor

I have tested the PR Build and the issue with downloads is now fixed.

/// <summary>
/// Downloaded externally via an URL.
/// </summary>
[JsonStringEnumMemberName("Browse")]
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a quick note that 'browse' usually indicates there's an expectation of user interaction with the URL? And that sometimes it's miscategorised by collection devs.

Might be worth noting, not everyone may always know/remember.

@@ -138,7 +144,7 @@ public TextEditorPageViewModel(
};

Document = document;
IsReadOnly = false;
IsReadOnly = context.FileId.IsT1;
Copy link
Member

Choose a reason for hiding this comment

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

This feels like a bit of a hack; but I'm not concerned about this for now, we can leave it as-is.

Eventually down the road, mod authors will want to be able to edit their own files; and they may try doing it in the App too, so there likely will be a case where you would want non-RO LibraryFiles. But such use case is very far from now, so I'm not concerned.

@Sewer56
Copy link
Member

Sewer56 commented Dec 16, 2024

Only misc notes. Mergeable as-is as far as I'm concerned.
Tested in App with a real collection (SD Very Expanded), looks good to me.

@erri120 erri120 merged commit e36e0fb into Nexus-Mods:main Dec 16, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants