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

Docs refresh with Astro #506

Merged
merged 32 commits into from
Oct 24, 2024
Merged

Docs refresh with Astro #506

merged 32 commits into from
Oct 24, 2024

Conversation

adierkens
Copy link
Member

@adierkens adierkens commented Sep 5, 2024

Updating our docs site to use astro.

TODO

  • Update styles to follow brand colors (defer)
  • Add image support
  • Fix styling for Platform & Content tabs
  • Swap search for algolia
  • Update all JSON examples to use TSX (defer)
  • Verify links
  • Validate Mobile
  • Set basePath & validate deployment stamping
  • Update HomePage content
  • Update about/history content (defer)
  • Platform tabs should retain selected platform
  • fix first card on team page being higher than the rest
  • Add Platform icon badges to plugin sidebar
  • Version (next/latest/major) selector
  • Fix AST Explorer

Version

Published prerelease version: 0.10.0-next.1

Changelog

Release Notes

ios: enhance tapable logger to handle variadic args from the JS log (#524)

Prefixing message with the format [Player] [\(logLevel)]: moved out of the Tapable logger and moved to PrintLoggerPlugin. Any consumers using their own LoggerPlugin will need to append the logLevel if they want to print it

Before

public class CustomLoggingPlugin: NativePlugin {
    
    public let pluginName = "CustomLoggingPlugin"

    public func apply<P>(player: P) where P: HeadlessPlayer {
        guard let player = player as? SwiftUIPlayer else { return }
        player.logger.logLevel = .trace
        player.logger.hooks.trace.tap(name: pluginName, { print("Custom message")\(($0))" ) })
        ...
    }

After

public class CustomLoggingPlugin: NativePlugin {
    
    public let pluginName = "CustomLoggingPlugin"

    public func apply<P>(player: P) where P: HeadlessPlayer {
        guard let player = player as? SwiftUIPlayer else { return }
        player.logger.logLevel = .trace
        let prefixedMessage = "[Player] [trace]: "
        player.logger.hooks.trace.tap(name: pluginName, { print("\(prefixedMessage) Custom message \(($0))" ) })
        ...
    }

Breaking Changes

Any usage of the player.logger.hooks taps will have breaking changes in the callback because the calls have been changed to provide a [Any] type instead of String so it can be returned in the form of messages instead of a single message. Unless nothing is done in the callback to access the value but just to print it, there should be breaking changes

Example:

// this should be no breaking change
player.logger.hooks.trace.tap(name: "log", { print("\(($0))" ) })

// if `values` should be accessed in anyway, i.e want the first value, or want to seperate the values
 player.logger.hooks.debug.tap(name: "log") { values in
            // values is of type [Any], if you want to print only the first value
            print("\((message as? [String])?.first))" )
        }

🚀 Enhancement

  • ios: enhance tapable logger to handle variadic args from the JS log #524 (@nancywu1)

🐛 Bug Fix

🏠 Internal

📝 Documentation

Authors: 4

@adierkens adierkens added the documentation Changes only affect the documentation label Sep 5, 2024
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 22.22222% with 63 lines in your changes missing coverage. Please review.

Project coverage is 91.88%. Comparing base (47aa811) to head (c9500a3).
Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
plugins/reference-assets/react/tailwind.config.js 0.00% 34 Missing ⚠️
...ns/reference-assets/react/src/assets/info/Info.tsx 0.00% 8 Missing ⚠️
.../reference-assets/react/src/assets/image/Image.tsx 0.00% 7 Missing ⚠️
plugins/reference-assets/react/postcss.config.js 0.00% 4 Missing ⚠️
...eference-assets/react/src/components/Separator.tsx 0.00% 4 Missing ⚠️
...eference-assets/react/src/assets/choice/Choice.tsx 50.00% 2 Missing ⚠️
.../reference-assets/react/src/assets/input/Input.tsx 33.33% 2 Missing ⚠️
...-assets/react/src/assets/collection/Collection.tsx 0.00% 1 Missing ⚠️
...ns/reference-assets/react/src/assets/text/Text.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
- Coverage   91.92%   91.88%   -0.05%     
==========================================
  Files         341      341              
  Lines       27290    27303      +13     
  Branches     1944     1944              
==========================================
  Hits        25087    25087              
- Misses       2189     2202      +13     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KetanReddy
Copy link
Member

We might want to redo the PlatformTabs component to use the Starlight Synced tabs component because that should automatically retain preference

@adierkens
Copy link
Member Author

The only downside was not persisting that to the URL for sharing (not sure if that's a big deal or not)

@KetanReddy
Copy link
Member

From whats left, I think we can defer styling and most content updates to post rollout tasks just so we can get this new version out. Only requirement left is probably the version selector and verifying stamping and mobile which I don't think we can really do until we put it out at least on next

@KetanReddy KetanReddy changed the title [skip ci] Docs refresh with Astro Docs refresh with Astro Oct 24, 2024
@KetanReddy KetanReddy marked this pull request as ready for review October 24, 2024 16:02
@KetanReddy KetanReddy self-requested a review as a code owner October 24, 2024 16:02
KetanReddy
KetanReddy previously approved these changes Oct 24, 2024
hborawski
hborawski previously approved these changes Oct 24, 2024
mercillo
mercillo previously approved these changes Oct 24, 2024
@KetanReddy KetanReddy dismissed stale reviews from mercillo, hborawski, and themself via c9500a3 October 24, 2024 16:57
@KetanReddy KetanReddy merged commit a032d8c into main Oct 24, 2024
9 of 11 checks passed
@KetanReddy KetanReddy deleted the docs-refresh branch October 24, 2024 17:24
This was referenced Oct 24, 2024
@intuit-svc intuit-svc mentioned this pull request Oct 26, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes only affect the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants