Skip to content

Conversation

@mportiz08
Copy link
Contributor

Bug/issue #, if applicable: 85271020

Summary

This fixes the following 2 issues with the logic for the new "variant overrides" support:

  • Navigating to a new page in Objective-C mode should still trigger a new request for data for the new page.
  • Navigating to a new page in Objective-C mode should apply a variant overrides patch (if available) after requesting its data.

These scenarios weren't accounted for because the majority of testing done previously was simply done by simulating toggling the language on the same page and didn't include example data for subsequent navigation.

Testing

Steps:

  1. Download/unzip archive.zip
  2. Configure VUE_APP_DEV_SERVER_PROXY=/path/to/unzipped/archive and run npm run serve
  3. Load http://localhost:8080/documentation/myframework
  4. Toggle the language to "Objective-C" and click the "Topics" link to the SimpleClass symbol
  5. Verify that the page for SimpleClass loads and is showing Objective-C content
  6. Ensure that the workflows from Add support for variant overrides #10 still work as before

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

* Navigating to a _new page_ in ObjC mode should trigger a new data request
* Navigating to a _new page_ in ObjC mode should apply a patch when available
This is not necessarily a problem now but there could be a future
service that renders a topic with the same identifier with different
URLs, so this Vue component key would be a better alternative in that
scenario and should work the same for pages now.
Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

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

Great work!

@mportiz08
Copy link
Contributor Author

@swift-ci test

@mportiz08 mportiz08 merged commit 8ec3cfc into swiftlang:main Nov 15, 2021
@mportiz08 mportiz08 deleted the 85271020/fix-objc-data-flow-with-variant-overrides branch November 15, 2021 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants