Skip to content

Serialized Feedback Editor#446

Merged
mtschoen-unity merged 4 commits into
developmentfrom
improvements/schoen/feedback-editor
Dec 9, 2017
Merged

Serialized Feedback Editor#446
mtschoen-unity merged 4 commits into
developmentfrom
improvements/schoen/feedback-editor

Conversation

@mtschoen-unity

Copy link
Copy Markdown
Collaborator

Purpose of this PR
There was a need to clear out the serialized data that stores the number of visible feedback presentations while testing. For example, if I want to show the system to a new user, I might want them to have a "fresh start," or I might want to just enable feedback for one or two features.

This gives us a way of viewing and editing the serialized data for feedback.

Testing status

Tested on Vive and Rift in various scenes. Tested starting EXR without activating the controllers, and with activating controllers but not engaging feedback. Found and fixed a bug where feedback data could be cleared, because we were always returning a SerializedFeedback, even if the nodes themselves were null.

Technical risk

Low: Only changes to actual EXR stuff were fixes/refactors. Adds an editor window.

Comments to reviewers

I had to expose a bunch of stuff as internal to get static access or access without EXR running. There is a little bit of code duplication as a result, and because Feedback Module is designed around being instantiated and working with EXR systems.

…e. presentation counts);

Refactor SerializedPreferenceModule to support access while EXR is not running;
Fix issue where Feedback preferences can get overwritten with blank data

@dunity dunity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's great to have a means of viewing feedback request data/views, and clearing presentation/view counts without clearing the other pref data.

One addition I feel this PR needs, is a means of setting the global MaxPresentations value within the editor/tab. Ideally we should have a means of setting a MaxPresentations value for each request, but that goes beyond the scope of this PR. The k_DefaultMaxPresentations value should be surfaced from ProxyFeedbackRequest, and allow the int/value to be set within this editor.

This will be a nice compliment to an eventual enum in the EditorVR preference panel, that allows for the following options : {AlwaysShow, Hide, ResetViewcountsEachSession}. The EditorVR editor pref panel should also have a means of opening the ProxyFeedbackEditor panel.

[Serializable]
class RequestData
{
readonly Action m_OnBecameVisible;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move below properties

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is addressed. Not sure why it's not hidden.

Comment thread Editor/ProxyFeedbackEditor.cs Outdated
{
sealed class ProxyFeedbackEditor : EditorWindow
{
Dictionary<Type, SerializedProxyFeedback> m_SerializedFeedback = new Dictionary<Type, SerializedProxyFeedback>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make readonly

if (preferences == null)
return;

foreach (var kvp in new Dictionary<Type, SerializedPreferencesModule.SerializedPreferenceItem>(preferences.items))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it necessary to create a new dict ? preferences.items is already a Dictionary<Type, SerializedPreferenceItem>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We are removing elements

@mtschoen-unity

Copy link
Copy Markdown
Collaborator Author

Oh yeah I forgot to ask/mention: is anyone else seeing errors all over ProxyFeedbackEditor within Visual Studio? It seems like it's ignoring the "InternalsVisibleTo" that we set up to access Engine stuff from an Editor class. If everyone else is getting it, I'll report a bug

@mtschoen-unity

Copy link
Copy Markdown
Collaborator Author

Manual merge successful. Performing Github merge

@mtschoen-unity
mtschoen-unity merged commit b250338 into development Dec 9, 2017
@mtschoen-unity
mtschoen-unity deleted the improvements/schoen/feedback-editor branch December 9, 2017 06:20
@mtschoen-unity mtschoen-unity added this to the 0.1.1 milestone Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants