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

Implement SDL-0216 Widget Support #1350

Conversation

mjuarez-ford
Copy link
Contributor

@mjuarez-ford mjuarez-ford commented Jul 16, 2019

Fixes #1270

This PR is ready for review.

Risk

This PR makes minor API changes.

Testing Plan

Unit test for new classes and properties.
Unit test and smoke test for the screen manager. (display capability redesign).

Summary

Implement proposal as defined

Tasks Remaining:

  • [Implement classes]
  • [Unit test to classes]
  • [Apply changes suggested in the merge comments]
  • [Check with Core]

CLA

@mjuarez-ford mjuarez-ford changed the title Feature/issue 0216 widget support WIP: Implement SDL-0216 widget support Jul 16, 2019
@joeljfischer joeljfischer added enhancement proposal Accepted SDL Evolution Proposal labels Jul 17, 2019
@mjuarez-ford
Copy link
Contributor Author

Thanks @joeljfischer I made the suggested changes and fixes. I just have one commet regarding the SDLCreateWindow init.

@kshala-ford
Copy link
Contributor

@joeljfischer the int and enum changes are done. The additional init shouldn’t be key for this proposal. Due to timing I would suggest to review and merge if no issue is left. I would like to start to work on the subsequent proposal and the capability converter #1386

@mjuarez-ford
Copy link
Contributor Author

Thanks @joeljfischer @kshala-ford I made the suggested changes.

Copy link
Contributor

@joeljfischer joeljfischer left a comment

Choose a reason for hiding this comment

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

Mostly minor documentation cleanup, with one bigger item.

Example Apps/Example ObjC/MenuManager.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLCreateWindow.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLCreateWindow.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLDisplayCapability.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLDisplayCapability.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLSoftButtonCapabilities.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLSystemCapability.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLDisplayCapability.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLDisplayCapability.h Outdated Show resolved Hide resolved
@@ -17,6 +17,7 @@

NS_ASSUME_NONNULL_BEGIN

__deprecated_msg("This RPC is deprecated. Use Show RPC to change layout when connected to a 6.0+ head unit. Since sdl_ios v6.4 / RPC spec 6.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

We've been discussing this a lot internally after tests with example apps have shown that this is a very confusing deprecation. Developers have to know that they must use this RPC when connected to systems < 6.0, and can use this method when connected to systems > 6.0 but not when changing widget layouts, where they must use Show.

It's obviously pretty confusing that developers must use a deprecated RPC to set layouts in most situations, but must not use it in other situations. Even worse is that despite that they must use the deprecated RPC, the compiler is going to throw a warning every time they do.

The conclusion that we came to is that even though the RPC is deprecated, we shouldn't deprecate this class in this PR and release. That way developers won't be faced with confusing deprecation warnings that they shouldn't actually do anything about. Second, we'll have to create very good documentation regarding changing widget layouts.

This isn't ideal and we can't alter the proposal at this point (and thus the RPC spec itself), but I think we'll have to do this in the iOS library (which isn't going against the letter of the proposal) in order to not confuse developers. We can also remove many of the #pragmas around SetDisplayLayout deprecations in the library at that point.

Copy link
Contributor

Choose a reason for hiding this comment

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

We've been discussing this a lot internally after tests with example apps have shown that this is a very confusing deprecation. Developers have to know that they must use this RPC when connected to systems < 6.0, and can use this method when connected to systems > 6.0 but not when changing widget layouts, where they must use Show.

I want to note the case that widgets are introduced with 6.0 hence logically the highlighted text isn't necessary to cover. So the concern is

version<6.0 use SetDisplayLayout && version>=6.0 use Show

I understand the concern. I believe this issue should be solved by introducing template configuration to the managers. Similar to what "Manager Update for Display Capability" does we should work on a proposal like "Manager Update for Template Configuration". If the screen manager would handle template configuration we could keep SetDisplayLayout deprecated. With this feature the deprecation message could be to suggest using ScreenManager and for Widgets using Show (as long as there are no widget manager... work on it...).

Without the manager update the deprecation is confusing. Here's what I would suggest:

  1. The deprecation for SetDisplayLayout remains in the mobile API.
  2. In iOS and Java SetDisplayLayout should not be marked as deprecated (we remove the deprecation flag)
  3. We work on a new proposal like "Manager Update for Template Configuration" which can be separate or part of a proposal like "Widget Screen Manager"
  4. The proposal doesn't modify mobile API but only the libraries (therefore can be implemented into the library without a Core change)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joeljfischer @kshala-ford The changes has been applied for iOS.
But for Android the merge request has been already been approved, so how should we proceed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The Android team here will take care of making the required changes to match @theresalech

Copy link
Contributor

@joeljfischer joeljfischer left a comment

Choose a reason for hiding this comment

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

I'm still doing final testing with Core which I should finish on Tuesday, but I have one more requested change leading up to that: there are numerous warnings throughout the tests as a result of the newly deprecated properties. Please update the tests with #pragma to disable the warnings.

@mjuarez-ford
Copy link
Contributor Author

@joeljfischer the ignore of deprecated properties on the tests is complete.

@joeljfischer joeljfischer merged commit d433cf5 into smartdevicelink:develop Sep 3, 2019
v6.4 automation moved this from Review in progress to Done Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Accepted SDL Evolution Proposal
Projects
No open projects
v6.4
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants