Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Tizen.NUI.Extension/RiveAnimation/RiveAnimationView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace Tizen.NUI.Extension
/// RiveAnimationView renders an animated vector image (Rive file).
/// </summary>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public class RiveAnimationView : View
Comment on lines +29 to 30

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To prevent the deprecated RiveAnimationView class from cluttering IntelliSense for developers using the SDK, it is recommended to hide it by applying the [EditorBrowsable(EditorBrowsableState.Never)] attribute. Since System.ComponentModel is already imported in this file, you can apply it directly.

    [Obsolete("This has been deprecated in API14, and will be removed in API16")]
    [EditorBrowsable(EditorBrowsableState.Never)]
    public class RiveAnimationView : View

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 [AI Review]
Applying [EditorBrowsable(EditorBrowsableState.Never)] here would conflict with TizenFX convention: that attribute marks APIs excluded from the official documentation surface, while a deprecated public API stays documented and supported through its grace period (deprecated in API14, removed in API16). The recent TCSACR-647 deprecation (commit 94eed19) followed the same [Obsolete]-only pattern without hiding the APIs from IntelliSense.

{
static RiveAnimationView() { }
Expand All @@ -35,6 +36,7 @@ static RiveAnimationView() { }
/// </summary>
/// <param name="url">The rive resource URL</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since the RiveAnimationView class itself is already marked with the [Obsolete] attribute, all of its constructors, methods, and other members are implicitly treated as obsolete by the compiler. Adding the [Obsolete] attribute to every individual member is redundant and introduces unnecessary code clutter.

Consider removing the [Obsolete] attributes from all the individual members (constructors and methods) in this class, keeping it only on the class definition itself.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 [AI Review]
The C# compiler does not implicitly treat members of an [Obsolete] type as obsolete — invoking a member through an existing instance reference raises no CS0618 unless the member itself is attributed — so the per-member attributes are not redundant. Annotating every member is also the established TizenFX pattern for ACR deprecations (e.g., TCSACR-647, commit 94eed19, and the ElmSharp API12 deprecations), where per-member attributes feed the per-API deprecation metadata in the generated docs.

public RiveAnimationView(string url) : this(Interop.RiveAnimationView.New(url), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Expand All @@ -54,6 +56,7 @@ internal RiveAnimationView(global::System.IntPtr cPtr, bool shown = true) : base
/// <param name="animationName">The animation to enable</param>
/// <param name="on">The enable state of given animation</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void EnableAnimation(string animationName, bool on)
{
Interop.RiveAnimationView.EnableAnimation(SwigCPtr, animationName, on);
Expand All @@ -63,6 +66,7 @@ public void EnableAnimation(string animationName, bool on)
/// Play animation.
/// </summary>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void Play()
{
Interop.RiveAnimationView.Play(SwigCPtr);
Expand All @@ -72,6 +76,7 @@ public void Play()
/// Pause animation.
/// </summary>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void Pause()
{
Interop.RiveAnimationView.Pause(SwigCPtr);
Expand All @@ -81,6 +86,7 @@ public void Pause()
/// Stop animation.
/// </summary>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void Stop()
{
Interop.RiveAnimationView.Stop(SwigCPtr);
Expand All @@ -92,6 +98,7 @@ public void Stop()
/// <param name="shapeFillName">The shape fill name</param>
/// <param name="color">The rgba color</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetShapeFillColor(string shapeFillName, Color color)
{
if (color == null)
Expand All @@ -105,6 +112,7 @@ public void SetShapeFillColor(string shapeFillName, Color color)
/// <param name="shapeStrokeName">The shape stroke name</param>
/// <param name="color">The rgba color</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetShapeStrokeColor(string shapeStrokeName, Color color)
{
if (color == null)
Expand All @@ -118,6 +126,7 @@ public void SetShapeStrokeColor(string shapeStrokeName, Color color)
/// <param name="nodeName">The node name</param>
/// <param name="opacity">The opacity of given node</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetNodeOpacity(string nodeName, float opacity)
{
Interop.RiveAnimationView.SetNodeOpacity(SwigCPtr, nodeName, opacity);
Expand All @@ -129,6 +138,7 @@ public void SetNodeOpacity(string nodeName, float opacity)
/// <param name="nodeName">The node name</param>
/// <param name="scale">The scale of given node</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetNodeScale(string nodeName, Vector2 scale)
{
if (scale == null)
Expand All @@ -142,6 +152,7 @@ public void SetNodeScale(string nodeName, Vector2 scale)
/// <param name="nodeName">The node name</param>
/// <param name="degree">The degree of given node</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetNodeRotation(string nodeName, Degree degree)
{
if (degree == null)
Expand All @@ -155,6 +166,7 @@ public void SetNodeRotation(string nodeName, Degree degree)
/// <param name="nodeName">The node name</param>
/// <param name="position">The position of given node</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetNodePosition(string nodeName, Position position)
{
if (position == null)
Expand All @@ -168,6 +180,7 @@ public void SetNodePosition(string nodeName, Position position)
/// <param name="animationName">The animation name</param>
/// <param name="elapsed">The elapsed time in seconds</param>
/// <since_tizen> 9 </since_tizen>
[Obsolete("This has been deprecated in API14, and will be removed in API16")]
public void SetAnimationElapsedTime(string animationName, float elapsed)
{
Interop.RiveAnimationView.SetAnimationElapsedTime(SwigCPtr, animationName, elapsed);
Expand Down
Loading