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

WIP: Add support for memberspace #712

Closed

Conversation

mpourismaiel
Copy link
Member

What this PR does / why we need it:
Add support for memberspace

Which issue this PR fixes:
fixes #631

Special notes for your reviewer:
The implementation works with a fragment that you can add to _global or any page or section globals and in turn nav fragment in those pages will display a login link. I didn't add anymore customizations since I'm not even sure if this is the best approach. My assumptions is that the user would create a memberspace.md file in _global with following content:

+++
fragment = "memberspace"
subdomain = "subdomain_copied_from_installation_guide_of_memberspace"
+++

And then the nav fragment will display a link to Login/Signup page in Memberspace. It would be recommended that the button Memberspace provides be disabled from their website. But we can also move the "go to top" button as we discussed.

If you have any other approach in mind please let me know and if everything is okay I can add documentation and we can move forward with the merge.

Release note:

- memberspace: New fragment that adds memberspace scripts to enable the service for Syna

@mpourismaiel mpourismaiel added this to the v0.16.2 milestone Feb 16, 2020
@mpourismaiel mpourismaiel requested a review from stp-ip February 16, 2020 14:23
@mpourismaiel mpourismaiel self-assigned this Feb 16, 2020
@ghost
Copy link

ghost commented Feb 16, 2020

Congratulations 🍻. DeepCode analyzed your code in 0.106 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@stp-ip stp-ip modified the milestones: v0.16.2, v0.17.0 Mar 24, 2020
Copy link
Member

@stp-ip stp-ip left a comment

Choose a reason for hiding this comment

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

Besides it hardcoding a fragment into another fragment this needs docs and a test page.

If this seems like non doable we can push this to the backlog and I'll cancel memberspace.

@@ -172,6 +172,7 @@
looking from the page directory or file to it's parents and so on. */}}
{{- $page_scratch.Set "page_fragments" (slice) -}}
{{- $page_scratch.Set "page_config" (slice) -}}
{{- $page_scratch.Set "memberspace" nil -}}
Copy link
Member

Choose a reason for hiding this comment

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

Using a global variable for a vendor specific fragment seems problematic.

@@ -81,6 +81,13 @@
</a>
</li>
{{- end -}}
{{- end -}}
{{- with ($page_scratch.Get "memberspace") }}
Copy link
Member

Choose a reason for hiding this comment

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

Adding a vendor specific fragment into another fragments code seems problematic.
We should inject it from a memberspace fragment or at least make this injection more generic.
As it currently stands this seems too bundled.

@mpourismaiel
Copy link
Member Author

Currently I can't think of any approach that would be less complex. I would love to hear ideas on the matter. Maybe remove the fragment and make it a site configuration, applied to the baseof template?

@stp-ip stp-ip modified the milestones: v0.17.0, v0.18.0 Apr 29, 2020
@stp-ip stp-ip modified the milestones: v0.17.1, v0.18.0 May 24, 2020
@JOduMonT
Copy link

I'm curious, it is like a paywall ?
What manage the authentication Discourse, Netlify ?

@stp-ip
Copy link
Member

stp-ip commented Jun 24, 2020

Memberspace is a paywall service especially for membership use cases. They have different modes of security. Simplest will remove content until payment via JS, one will add the content in via JS from their DB after payment/login.

Authentication is therefore done on the memberspace side of things.

Link to service: https://memberspace.com

@mpourismaiel mpourismaiel removed their assignment Jun 24, 2020
@JOduMonT
Copy link

I didnt knew it was a SaaS
I wonder if these bypass works ?

@stp-ip
Copy link
Member

stp-ip commented Jun 25, 2020

Most likely depends on the mode used.
But that's not part of Syna so not really relevant here.

@stp-ip
Copy link
Member

stp-ip commented Jul 21, 2020

Let's shelf this for now. We first need a better idea around provider fragments and also can't add things globally for a fragment.

Possible option for injecting something like this is the fragments JS or our event framework. Let's discuss this separately.

@stp-ip stp-ip closed this Jul 21, 2020
@stp-ip stp-ip added the revisit label Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add memberspace to Syna
3 participants