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

Add new SDK archive page #901

Merged
merged 10 commits into from
Mar 23, 2018
Merged

Add new SDK archive page #901

merged 10 commits into from
Mar 23, 2018

Conversation

mit-mit
Copy link
Member

@mit-mit mit-mit commented Mar 21, 2018

Add a new page displaying SDK bundles

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Mar 21, 2018
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added cla: no Contributor has not signed the Contributor License Agreement and removed cla: yes Contributor has signed the Contributor License Agreement labels Mar 21, 2018
@DanTup
Copy link
Contributor

DanTup commented Mar 21, 2018

@mit-mit I've pushed changes - they won't work until the JSON files on googlestorage have a header like access-control-allow-origin: * to allow them to be pulled in via ajax.

@mit-mit
Copy link
Member Author

mit-mit commented Mar 21, 2018

Thanks much @DanTup. Can you please confirm that you are "ok with your commits being contributed to this project" per the cla bot? If so, just leave a comment here stating that.

@DanTup
Copy link
Contributor

DanTup commented Mar 21, 2018

I confirm that I am ok with my commits being contributed to the project (and I think my own PRs here show that I've completed the CLA) 👍

@DanTup
Copy link
Contributor

DanTup commented Mar 21, 2018

@mit-mit It'll be easier for me to test this from multiple browsers once the allow-origin thing is sorted and we can stage this somewhere, so let me know once that's sorted.

@mit-mit
Copy link
Member Author

mit-mit commented Mar 21, 2018

CORS was configured, and this was pushed to staging: https://flutter-website-staging.firebaseapp.com/sdk-archive/ !

js/archive.js Outdated
}

function convertReleaseFormat(releases, os) {
// Convert releases into a format that's easier to work with:
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want a different format in the source data, I can do that. The website is the only consumer of this, so it's not going to break anyone.

Would you rather have the 'releases' member just be an array of dictionaries laid out like "New:" below? I didn't do that because then I have to do duplicate checking when I add a new one to the list (to be sure that there isn't already one with the same hash/channel combination), but I can do that pretty easily.

Copy link
Contributor

Choose a reason for hiding this comment

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

Your call, this code already works, but simplifying it is always good. The main reason I converted it was that it wasn't sorted (object keys don't have an order, so they basically come through sorted by the has in the json), but I then flattened it to simplify some other code.

If you want to change it, having an array pre-sorted by date would be good. Moving complexity to the server seems like a good idea IMO because we control the environment (the less code running in all the different browsers, the better!).

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way - we're currently pulling three files that are mostly the same, just with different archive links - would it be difficult/worthwhile to just have one file that has three archive links within each release object?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, we should leave them separate, because they are updated independently from three different build servers, and if they were one file, then it would be vulnerable to race conditions when updating the data (the windows build server could read the file, the linux one updates it, and then the windows one replaces it, reverting the linux update, for instance). We could implement a locking scheme, but that would complicate the code, and I'd rather not do that until we have to.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, makes sense. I forgot this was more than just the git clone. LMK what you want to do about the format - if we're going to change it, doing it before we merge this is best!

Copy link
Contributor

Choose a reason for hiding this comment

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

I am working on a PR that will generate what you asked for: I figure it'll be easier to do now before we're live. I'll send it to you for review.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, here's the PR: flutter/flutter#15834

Copy link
Contributor

Choose a reason for hiding this comment

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

My PR has been merged, and I've updated the existing metadata to the new format.

@DanTup
Copy link
Contributor

DanTup commented Mar 21, 2018

@mit-mit I need to do some more testing of this in other browsers before it's merged (I haven't tested IE/Edge).

BTW - did something break with the access-origin change? It was fine earlier when first noted it was fixed, but now I'm seeing it broken again.

@mit-mit
Copy link
Member Author

mit-mit commented Mar 21, 2018

BTW - did something break with the access-origin change? It was fine earlier when first noted it was fixed, but now I'm seeing it broken again.

It still seems to work for me!?

@DanTup
Copy link
Contributor

DanTup commented Mar 21, 2018

Weird, seems ok again now. It was broken on forced refreshes (same error) just a few minutes ago. Ah well, I'll keep an eye on it. I'll test on Windows tomorrow and make any required changes.

Copy link
Contributor

@filiph filiph left a comment

Choose a reason for hiding this comment

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

LGTM with one nit

tab.find(".loading").text("Failed to load releases");
}

// Send requests to render the tables.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this running on every page of flutter.io? It seems it does.

Consider only running the fetch when on a particular page or when a particular element is found.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, whoops! When I mocked it up the JS was only included in my test page, but you're right this is happening everywhere. I'll fix in the morning.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed!

sdk-archive.md Outdated
<div id="tab-set-os" class="sdk-archives">
<ul class="tabs__top-bar">
<li class="tab-link current" data-tab="tab-os-windows">Windows</li>
<li class="tab-link" data-tab="tab-os-macos">Mac OS</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that Apple spells it "macOS" on all their materials.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed!

@DanTup
Copy link
Contributor

DanTup commented Mar 22, 2018

@mit-mit just saw this again... Here's the HTTP readers - note the Date in the header is now, but the Last-Modified is two days ago (and the accept header was missing). Is there something serving up a cached version of this from before the header was added?

Edit: The last modified date probably isn't an issue, I guess the headers are separate from the modified date of the file/contents. Still, it didn't have the access-origin header again; something doesn't seem right.

screen shot 2018-03-22 at 07 35 08

@DanTup
Copy link
Contributor

DanTup commented Mar 22, 2018

Seems to work fine in Edge and IE11 too.

@FlutterBot
Copy link

Staging URL Generated At https://flutter-io-deploy-two.firebaseapp.com . Please allow Travis Build to finish to view the URL.

mit-mit and others added 10 commits March 22, 2018 10:32
This restricts the tab changing to a container but also makes the prefix/storage name dynamic so we don't have to call non-editor tabs editors (eg. OSes).
The rest of the site is already using macOS.
No longer required since source data format matches what we converted to.
@DanTup
Copy link
Contributor

DanTup commented Mar 23, 2018

@mit-mit I've pushed a change to handle the data in the new format that @gspencergoog pushed; you'll need to update the staging site for it to start working again.

Let me know if anything else needs tweaking.

@mit-mit
Copy link
Member Author

mit-mit commented Mar 23, 2018

@mit-mit
Copy link
Member Author

mit-mit commented Mar 23, 2018

@gspencergoog if you think we are ready to merge, please approve/lgtm.

For now this would just be an new page not linked to. Then I'll do another PR next week to update the main installation page with a link to most recent beta, and a link to this archive.

@gspencergoog
Copy link
Contributor

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog
Copy link
Contributor

Ship it!

@mit-mit mit-mit merged commit bfa913c into flutter:master Mar 23, 2018
@mit-mit mit-mit deleted the install-bundles branch March 23, 2018 15:14
ZhangQinglian added a commit to flutter-dev/website that referenced this pull request Apr 12, 2018
* Fix typo in index.md. (flutter#860)

* Update flutter-for-react-native.md (flutter#859)

* Fix typo (flutter#861)

* Update flutter-for-react-native.md (flutter#865)

This sentence read: 'In order to make Row' and then proceeded to show how to arrange things in a column.

* Fix some more typos (flutter#862)

* Update MaterialApp ctor argument mentioned in debugging.md (flutter#863)

Previously `debugging.md` mentioned `debugShowGrid` as an argument for `MaterialApp`'s constructor.
I believe this came from the `stocks` example as `MaterialApp` has `debugShowMateralGrid` not `debugShowGrid`.

* Clarify which devices we do not support (flutter#856)

Fixes flutter/flutter#14437

* Update docs.md

* Use the more stable beta channel for analysis (flutter#872)

This works around flutter/flutter#15293 and flutter/flutter#15301.

* Fix a typo in the class description (flutter#876)

* Cookbook part4 (flutter#869)

* More Recipes for the cookbook on Images, Lists, and Gesture Handling.

* Fix Horizontal List complete example

* Fix Typo in Long Lists recipe

* Next few recipes

* Fix indent (flutter#864)

* Allow linking directly to specific tool and persist across site (flutter#831)

* Allow selection of tab from hash in url

* Add selected tool to url during tab changes

* Persist selected tool in localStorage to follow around site

* Use replaceState to avoid causing history entries if you flip back and forth.

Fixes flutter/flutter#14888.

* Fixes the explin (flutter#875)

* Add hyphens to links in post content (flutter#873)

This avoids extending width of post content if links have long words.

* Update using-packages.md (flutter#867)

* Update using-packages.md

Adding word "Or" to clarify running packages get command can be done from IntelliJ or from Terminal

* Add a forced newline

* Align bridging sidebar titles, and shorten to fit on one line (flutter#855)

* Align bridging sidebar titles, and shorten to fit on one line

* Align Web devs page title with Android and React native ones

* using typo (flutter#879)

* Fix typo (flutter#881)

* Fixed spelling error in getting-started (flutter#878)

* Delete a box design of sentence (flutter#882)

A sentence of "... at the following link ..." of "Problems?" of Step 6, it is only surrounded a box design (by div, pre, and code tags). Other steps, it is a normal design sentence.

* Fixes the clipping issue on Safari for Flutter for RN section. (flutter#886)

* Adds a Flutter for RN md file and a sidebar link

* Image link and style fixes

* Flutter get-started link updated

* Hello world text and preview fixes along with other minor fixes

* Hello world code and preview fixes along with other minor fixes

* Deletes junk flutter for rn files

* Update flutter-for-react-native.md

* Fixes the clipping issue on mobile browsers

* Add cookbook image demos, fix dismissable link (flutter#880)

* Add cookbook image demos, fix dismissable link

* Change Dismissable to Dismissible

* Jank no more doc (flutter#870)

* Stashing

* Stashed.

* A new version of the jank page. (In process)

* New screenshots, and less text about Observatory.

* Incorporating Chinmay's feedback.

* Tweaking

* Tweaking, changing title.

* Incorporating feedback.

* Tweaking

* Tool UI (pics) changed, and incorporating feedback.

* Fixing alt text on images.

* Incorporating Devon's feedback.

* Adding a link to the new performance profiling page.

* Incorporating Wm's feedback.

* Adding more feedback, and placing the doc in the sidenav.

* tweak to the new performance article (flutter#888)

* Remove space breaking a markdown link. (flutter#887)

The extra space character prevents the link from being clickable.

* typo fixes (flutter#890)

* Add a few more recipes and two migrations (flutter#884)

* [Cookbook] Reading, writing data to key-value (shared preferences) (flutter#877)

* Adde key-value section to flutter cookbook

* Fixed spelling errors, grammar. Added better example

* Fixed grammar, changed you and your to we and our

* Fixed text and grammar.

* Added 'the' to few places.

* Update main.dart (flutter#885)

Update to coincide with Update index.md flutter#883 - Added the textDirection property to reflect the API change for text RTL support for text widgets that are not a descendant of MaterialApp.

* Update index.md (flutter#883)

Added the textDirection property to reflect the API change for text RTL support for text widgets that are not a descendant of MaterialApp.

* remove references to deprecated createHttpClient method (flutter#893)

* Fix constructor name of `MyStatefulWidget` (flutter#898)

* Add missing parameter (flutter#891)

* Clarify why Android Studio is needed (flutter#900)

* update (flutter#892)

* Add new SDK archive page (flutter#901)

* Add new SDK archive page

* Fix typos

* Update tabs to support different types/names

This restricts the tab changing to a container but also makes the prefix/storage name dynamic so we don't have to call non-editor tabs editors (eg. OSes).

* Add a table of releases to sdk-archive page

* Show a failure message when loading fails

* Move Master inside tabs

* Fix page jumping to top when showing all

* Change "Mac OS" to "macOS"

The rest of the site is already using macOS.

* Don't request archives when we're not rendering them

* Remove conversion/sort code

No longer required since source data format matches what we converted to.

* A few minor typos (flutter#894)

* Add cupertino picker to widget catalog (flutter#903)

* Replace heart with tile in getting-started (flutter#904)

* Add new recipes for fonts, animations, and drawers (flutter#896)

* Fix Build (flutter#916)

* Make Windows requirments more specific (flutter#917)

* Added example to show RESTful JSON POST (flutter#839)

* De dupe ide steps (flutter#899)

* Remove redundant IDE steps

* Remove unused file

* Remove one more mentioning of IDE steps

* Fix typo (flutter#919)

* Update index.md (flutter#914)

Delete </aside> closing tag that was left.

* Update index.md (flutter#910)

Fix duplicate "the the".

* Fix website build (flutter#922)

* Fix links in "File issue" links

page.path is the filename from the repo, page.url is the url of the resulting page.

Fixes flutter/flutter#15349.

* Update index.md (flutter#924)

* Update index.md

* Update index.md

* Update iOS setup (flutter#918)

Reflect Xcode 9.0 requirement given by flutter doctor

* Fix networking example (flutter#921)

* Update fetch-data.md

Rename `json` variable to `_json`

* Rename _json to responseJson

* Add VS Code to Using-IDE page (flutter#906)

* Add tabs and empty VS Code page

This is on its own page so it can have a toc (our current kramdown tov plugin appears to not support multiple within one page).

* Fix bad IDs for tabs

* Support href-based tabs

If a tab has a data-tab-href then navigate to it. If no tab is found, bail out and don't hide content (this allows us to skip all the storage/hash fragments for href-based tabs).

* Commit all Android Studio content in VS Code page

To make it easier to review the changes made, if required.

* First cut at VS Code IDE page

* Remove ID that link checker doesn't like

This does work, but the checker can't verify it :(

* Tweaks based on @devoncarew's feedback

* Tweaks from review

plus fix for rebasing over latest tab changes that require a container around them.

* site bar -> Side Bar

* Add link to #vscode

Also change exclusion in rakefile to be a regex, seems like "#" was being compared as an exact string.

* Link "command palette" to VS Code docs

* Add docs on sharing assets with the platform

* Remove developer.apple.com links from link checking (flutter#928)

* Remove developer.apple.com links from link checking

To work around flutter/flutter#16268

* Commas for the win

* Change installation to use bundles (flutter#912)

Change Flutter installation to use pre-built installation packages that can simply be extracted for installation.

* Revert previous update of asset section.

* Fix Apple.com links (flutter#931)

* Add docs on sharing assets with the platform (flutter#929)

* Improve the Views section of flutter-for-android (flutter#927)

* Improve the Intents section of flutter-for-android (flutter#932)

* Improve the Views section of flutter-for-android

* Improve Intents section in flutter-for-android

* Improve the Async UI section in flutter-for-android (flutter#933)

* Improve the Project structure and Resources section in flutter-for-android (flutter#934)

* Improve the Async UI section in flutter-for-android

* Improve the Project section in flutter-for-android

* Update version of http in sample code

* adding rake to Gemfile. Rake is used to validate links as described in README's developing step 7 (flutter#930)

* Fix typo (flutter#936)

Fix minor typos in catalog/samples page

* Updating the accessibility info. (flutter#926)

* Facebook Login Package (flutter#895)

Since the https://pub.dartlang.org/packages/flutter_facebook_connect is no longer maintained, updated it with https://pub.dartlang.org/packages/flutter_facebook_login

* Update Learn More link to point to beta 2 post (flutter#943)

* Fix code validation issue (flutter#944)

Currently failing with `child' is deprecated and shouldn't be used at example/text_input_md_1.dart:31:15 • deprecated_member_use`

* Make the formatter happy (flutter#945)

Follow-up to flutter#944

* Cookbook: Background processing, Orientation, and Updates (flutter#920)

* Update key-value recipe

* Add background processing example

* Add orientation recipe

* Update a few stale FAQ entries (flutter#940)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: no Contributor has not signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants