Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Open embed links in same container #11

Closed

Description

@moT01

freeCodeCamp will use the embed feature with CodeAlly. When I open a link to one of those containers, close it, and try to open the same link, it appears to create a new container. We need it to open the same container so users can pick up tutorials where they left off. Before the transition from Strove to CodeAlly this seemed to be how it worked, so I'm hoping it's an easy fix.

Activity

  1. added
    Priority: High
    Priority: Medium
    and removed
    Priority: High
    on Mar 30, 2021
  2. added
    Priority: High
    and removed
    Priority: Medium
    on Jul 20, 2021
  3. moT01 commented on Oct 5, 2021

    @moT01
    MemberAuthor

    This seems to be working after the latest updates, but not quite how I was hoping. Maybe I wasn't specific enough. Here's some more details - The fCC site will look something like this:
    Screen Shot 2021-10-05 at 2 54 36 PM
    Each button there opens a link/container with the following code:

    <iframe
      className='codeally-frame'
      // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
      sandbox='allow-modals allow-forms allow-popups allow-scripts allow-same-origin'
      src={`http://codeally.io/embed/?repoUrl=${url}${envVariables}`}
      title='Editor'
    />
    

    The repoUrl=${url} will have the repo associated with each of the buttons (tutorials) in the first image. The current behavior, after the latest updates, seems to be that any link always takes you to the same container. So if I open the learn-bash-by-building-a-boilerplate tutorial, it creates a container - then, if I go back and try to open any other tutorial, it opens that same container.

    The behavior I was hoping for - is that when I open a tutorial I have not started before, it creates a new container. If it's one I have started before, it opens the one that was previously created for that tutorial. I hope that makes sense. I do believe that was the behavior at one point. Let me know if I can be of any help.

  4. AdamZaczek commented on Oct 6, 2021

    @AdamZaczek
    Collaborator

    This makes sense and was the planned behavior. We will check what's not working yet. Passing env variables required a ton of changes in how we're handling embeds. Sorry for the issues!

  5. jarosznatalia91 commented on Oct 28, 2021

    @jarosznatalia91

    OK, this should be fixed now. From now on if repoUrl changes, app will open new container - with existing data for previously visited repoUrls and completely new for others.

  6. moT01 commented on Nov 16, 2021

    @moT01
    MemberAuthor

    Sorry for the delayed response here. This doesn't seem to be working quite right. I'm not sure exactly what's going on, but here are some examples of what I might be seeing... First, I open project 1, it loads as expected. Then I open project 2 and it loads as expected. I try to go back to project 1, it loads the project 2 container. I open project 3, it loads project 2 container. I open project 4, it opens project 3 container. This isn't necessarily exactly what I am seeing, but a good example of it. It's kind of unpredictable on what project will load. One thing I see sometimes, right when the VM loads, is a quick flash of the expected project before it goes to an unexpected project. Not quite sure what's going on.

  7. AdamZaczek commented on Nov 18, 2021

    @AdamZaczek
    Collaborator

    I didn't manage to make it misbehave anymore! Please let me know if it also works on your end!

    Iframes tend to cache the internal websites so it's likely that our changes have not been updated on your end yet.

  8. moT01 commented on Dec 7, 2021

    @moT01
    MemberAuthor

    I only tested this a little bit, but I believe it is working properly 👍

    Thanks @AdamZaczek 🎉

  9. AdamZaczek commented on Dec 7, 2021

    @AdamZaczek
    Collaborator

    Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CodeAllyPriority: High

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions