swift-doc icon indicating copy to clipboard operation
swift-doc copied to clipboard

Support for @available attributes

Open MattKiazyk opened this issue 5 years ago • 1 comments

Currently, swift-doc only shows the @available(... grouped together with the code

Screen Shot 2020-05-11 at 10 31 56 PM

Would it be possible for swift-doc to support @available attributes, so that end users can see which protocols, functions, etc are no longer supported?

I've come with some Acceptance Criteria of sorts that I think is needed.

  • @available(... should be split out from the main code description
  • Certain attributes (like deprecated) should be shown with the Deprecated marker similar to Apple Docs ex: https://developer.apple.com/documentation/uikit/uiactionsheet
  • Certain attributes (like renamed) should also show a warning section with the string at the top of the view. ex: https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/1617988-touchidany
  • Anywhere we show the property and it'sdeprecated we should strikethrough. ex: https://developer.apple.com/documentation/uikit/uiactionsheet

MattKiazyk avatar May 12 '20 03:05 MattKiazyk

@mattt just wondering if there's anything I can do to get this moving forward in #106 ? In my current project, I have a few deprecated methods which could use this update. More then willing to start updating the output, but just was making sure the direction in the PR is the way you are seeing it?

MattKiazyk avatar Aug 24 '20 16:08 MattKiazyk