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

Update examples for 20.033 #269

Merged
merged 11 commits into from
Jan 24, 2022

Conversation

edew
Copy link
Contributor

@edew edew commented Jan 13, 2022

This PR updates the examples to work with charting library version 20.033. In most cases the only changes needed were to remove the use of the datafeed's polyfill file, and stop using a deprecated constructor property.

  • Update use of deprecated container_id option
  • Update READMEs to mention new minimum version
  • Update versions of React, Angular, Rails, etc.
  • Remove use of datafeed's polyfills

The React Native example is currently broken for Android and is being looked at on another branch: CL-1194_update_react_native_examples

Comment on lines 3 to 11
The earliest supported version of the charting library for these examples is `v20.033`.

## How to start

1. Copy all files from https://github.com/tradingview/charting_library/ to `app/src/main/assets/charting_library/`. The earliest supported version of the Charting Library is 17. If you get 404 then you need to [request an access to this repository](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/).
1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/).
1. Install dependencies `npm install`.
1. Copy the charting library files
1. If you are able to run bash scripts then the `copy_charting_library_files.sh` script can be used to copy the current stable version's files.
1. If you are not able to run bash scripts then do the following:
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't there a way to only put that bit of text somewhere "central" and link it to all README files rather than mainly copying/pasting?
I get that examples may not change very often but we could later imagine having a script of some sort checking if at least the examples still work with vXYZ of CL without having to amend a bunch of files just to reflect a version change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could extract the common text to the root README and link to it from the sub-READMEs?

@@ -0,0 +1,26 @@
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't we hoist that file outside of a specific "technology" and just have a dedicated one that would import it and pass some specific params to it as an object/array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could refactor this definitely. I didn't yet because it's just a helper script. It would probably be slightly easier to maintain if there were one copy.

@@ -0,0 +1,31 @@
# This is an rcfile for Browserslist (https://www.npmjs.com/package/browserslist)
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't we use a shareable config for this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could try to extract it if it would be useful to the other language/framework examples. In this case it's here because the React project generator includes it. I don't know what the best way to share it across the projects would be?

Copy link
Contributor

@romfrancois romfrancois left a comment

Choose a reason for hiding this comment

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

More questions than requested changes.

android/README.md Outdated Show resolved Hide resolved
nextjs-javascript/next.config.js Show resolved Hide resolved
@edew edew requested a review from timocov January 21, 2022 13:06
@timocov timocov merged commit fa7bbb7 into master Jan 24, 2022
@timocov timocov deleted the CL-1194_update_min_library_version_in_examples branch January 24, 2022 11:04
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.

3 participants