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 initial version of RSS plugin #6

Merged
merged 1 commit into from
Jun 29, 2020
Merged

Add initial version of RSS plugin #6

merged 1 commit into from
Jun 29, 2020

Conversation

reefdog
Copy link
Collaborator

@reefdog reefdog commented Jun 24, 2020

This initial version of the RSS plugin adds:

  • A control settings area for app owners to set authenticated feed credentials
  • Attempting to load and validate user data set by the SSO plugin
  • Attempting to load and use authenticated feed credentials set by the control
  • Negotiating which feed to use based on authentication status
  • Fetching and rendering headlines appropriately

It is missing:

  • The ability to read an article
  • Styling/branding
  • Live verification of the user information read from localStorage (i.e., ensuring the user is still an active user by checking the Auth0 API)
  • Graceful handling of incorrect authenticated feed credentials
  • Complete JSDocs of application JS

Steps to Test

Prerequisites: You'll need the username and password for the STAT Plus authenticated feed.

  1. Pull the plugin and load it into a BuildFire SDK plugins/ directory.
  2. Start the SDK with yarn start
  3. Navigate to the plugin tester (should be this URL)
  4. You should now get the unauthenticated "STAT News Headlines" in the widget. ✋ Note: You'll see some individual entries prefixed "STAT Plus". These are unpaywalled STAT Plus articles inserted into the standard feed.

For the next steps (testing authenticated feed), you have to have the SSO Plugin (#5). Assuming you have that setup also, authenticate using that plugin and then come back to this plugin and continue:

  1. Upon initial load, you should get a console.error about missing authenticated feed credentials (which it complains about since it recognizes you're an authenticated user), but the unauthenticated STAT News Headlines should still load as a fallback.
  2. Enter valid authenticated feed credentials (from Prerequisites) in the left-hand ("Control Settings") section. Save and refresh.
  3. You should now get the authenticated "STAT Plus News Headlines" in the widget.

Related Issues

Affects #4 (but does not yet resolve)

@reefdog reefdog requested a review from slifty June 24, 2020 17:12
@reefdog reefdog self-assigned this Jun 24, 2020
@reefdog reefdog added the plugin: rss Relates to the RSS plugin label Jun 24, 2020
@reefdog reefdog force-pushed the 4-add-rss-plugin branch 2 times, most recently from 287febb to 1c9f964 Compare June 24, 2020 22:18
Copy link
Member

@slifty slifty left a comment

Choose a reason for hiding this comment

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

Looks good for this stage! Just that one note about toggle but we can press on without re-review

rssPlugin/control/settings/index.html Outdated Show resolved Hide resolved
rssPlugin/control/settings/index.html Outdated Show resolved Hide resolved
This initial version of the RSS plugin adds:

- A control settings area for app owners to set authenticated feed
  credentials
- Attempting to load and validate user data set by the SSO plugin
- Attempting to load and use authenticated feed credentials set by the
  control
- Negotiating which feed to use based on authentication status
- Fetching and rendering headlines appropriately
- Image resources required by BuildFire

It is missing, among other things:

- The ability to read an article
- Any styling or branding
- Live verification of the user information read from localStorage

Affects #4
@reefdog reefdog force-pushed the 4-add-rss-plugin branch from 1c9f964 to 4d22dde Compare June 29, 2020 03:44
@reefdog
Copy link
Collaborator Author

reefdog commented Jun 29, 2020

Sweet! Agree and made the change.

@reefdog reefdog merged commit c054cd5 into master Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: rss Relates to the RSS plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants