-
Notifications
You must be signed in to change notification settings - Fork 14
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
Rc/core make widow width available in session #1414
Rc/core make widow width available in session #1414
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good though we should be adding tests here or on FP to demonstrate the sample usage of this parameter.
Yes, definitely. I wanted to make sure this approach was making sense before adding a test/tests. |
Yes, I think this is what we want. |
duplicate this PR |
@shubham1g5 I'd like to go ahead and merge this, since the test in the FP PR depends on the changes here. How does that sound to you? |
It will break the |
TreeElement sessionMeta = new TreeElement("context", 0); | ||
|
||
addData(sessionMeta, "deviceid", deviceId); | ||
addData(sessionMeta, "appversion", appversion); | ||
addData(sessionMeta, "username", username); | ||
addData(sessionMeta, "userid", userId); | ||
addData(sessionMeta, "drift", String.valueOf(drift)); | ||
addData(sessionMeta, "windowwidth", windowWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windowwidth
troubles me a bit, can we underscore it as window_width
although inconsistent with other params.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll change it to window_width
this.frame = session.getFrame(); | ||
this.setFrameStack(session.getFrameStack()); | ||
this.windowWidth = windowWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that covered by the call on line 57?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think you're right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, though we should address https://github.com/dimagi/commcare-core/pull/1414/files#r1705888450 before merging.
Sorry for the late jump in on this, but was the documentation updated in the core repos for how this new field works and what the value sets are? There's lot of discussion in the specs but I didn't see the outcome become clear anywhere. This feature has a very, very high probability of creating confusing behaviors where two people receive different experiences in ways that are extremely opaque, and being overloaded for different purposes, so I want to make sure that we have all of the ways it works be extremely unambiguous. |
The docs need to be updated here https://github.com/dimagi/commcare-core/wiki/commcaresession. I'll update it today. @shubham1g5 @MartinRiese Is there any other place you're aware of that documentation should be updated? |
Technical Summary
jira ticket
Related Formplayer PR
Related Web Apps PR
Safety Assurance
Safety story
Automated test coverage
QA Plan
QA Ticket
Special deploy instructions
Rollback instructions
Review
Duplicate PR
Automatically duplicate this PR as defined in contributing.md.