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

Change Newsletter section in Landing page #102

Closed
pedropcamellon opened this issue Oct 9, 2022 · 30 comments · Fixed by #175
Closed

Change Newsletter section in Landing page #102

pedropcamellon opened this issue Oct 9, 2022 · 30 comments · Fixed by #175
Assignees
Labels
bug Something isn't working hacktoberfest Hacktoberfest hacktoberfest2022 Hacktoberfest 2022 hacktoberfest-accepted Hacktoberfest Accepted v2.0-roadmap Version 2.0 Roadmap
Milestone

Comments

@pedropcamellon
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In section "Subscribe To Our Newsletter" appears a little vertical overflow showing scroll bars.

Describe the solution you'd like
Remove the overflow.

Additional context
img

@devarshishimpi devarshishimpi added bug Something isn't working v2.0-roadmap Version 2.0 Roadmap hacktoberfest Hacktoberfest hacktoberfest-accepted Hacktoberfest Accepted hacktoberfest2022 Hacktoberfest 2022 labels Oct 9, 2022
@devarshishimpi devarshishimpi added this to the v2.0-roadmap milestone Oct 9, 2022
@devarshishimpi
Copy link
Member

@Pcamellon Thanks For Pointing Out!! Do you want me to assign it to you as well?

@pedropcamellon
Copy link
Contributor Author

Yes! Thanks

@pedropcamellon
Copy link
Contributor Author

pedropcamellon commented Oct 9, 2022

In NewsLetter component I converted the Function to a Class and tried accessing the elements inside of iframe like this but I'm getting null:

class NewsLetter extends React.Component {
  constructor(props) {
    super(props);
    this.iframe = React.createRef();
  }

  componentDidMount() {
    // This returns null
    console.log(
      this.iframe.current.contentWindow.document.querySelector(
        ".sharedForm"
      )
    );
  }

  render() {
    return (
      <section className="news-section">
        <iframe
          title="newsletter"
          src="https://airtable.com/embed/shrUwGnyLnDvLvBoJ?backgroundColor=purple"
          width="100%"
          height="100%"
          frameBorder="0"
          allowFullScreen=""
          style={{
            position: "absolute",
            top: "0",
            left: "0",
          }}
          ref={this.iframe}
        ></iframe>
      </section>
    );
  }
}

export default NewsLetter;

This is the element I'm traying to acces for removing the overflow:

Subscribe To Our Newsletter 2

They say "You can't access the contents of an iFrame if it's cross-domain. See Same-Origin policy." here.

Do we need to use the embedded option or could we try making our own form and posting and fetching trough airtable api ?

@devarshishimpi
Copy link
Member

In NewsLetter component I converted the Function to a Class and tried accessing the elements inside of iframe like this but I'm getting null:

class NewsLetter extends React.Component {
  constructor(props) {
    super(props);
    this.iframe = React.createRef();
  }

  componentDidMount() {
    // This returns null
    console.log(
      this.iframe.current.contentWindow.document.querySelector(
        ".sharedForm"
      )
    );
  }

  render() {
    return (
      <section className="news-section">
        <iframe
          title="newsletter"
          src="https://airtable.com/embed/shrUwGnyLnDvLvBoJ?backgroundColor=purple"
          width="100%"
          height="100%"
          frameBorder="0"
          allowFullScreen=""
          style={{
            position: "absolute",
            top: "0",
            left: "0",
          }}
          ref={this.iframe}
        ></iframe>
      </section>
    );
  }
}

export default NewsLetter;

This is the element I'm traying to acces for removing the overflow:

Subscribe To Our Newsletter 2

They say "You can't access the contents of an iFrame if it's cross-domain. See Same-Origin policy." here.

Do we need to use the embedded option or could we try making our own form and posting and fetching trough airtable api ?

We'll probably shift to our own form with Airtable API. I think we'll go with formspree

@devarshishimpi
Copy link
Member

You can work on a custom form and add it to that section. We'll use formspree for submitting the forms and then Zapier to integrate with Airtable, or maybe Formspree's direct integration with Airtable

@pedropcamellon
Copy link
Contributor Author

pedropcamellon commented Oct 9, 2022

Here is a prototype I made in Figma.

Here is also an screenshot:
image

What do you think?

@khushi818
Copy link
Member

It looks amazing. What if we centralize the heading for desktop version?

@devarshishimpi
Copy link
Member

Yep, Works

@devarshishimpi
Copy link
Member

It looks amazing. What if we centralize the heading for desktop version?

Hmm, and then later responsive in the center for mobile devices as well

@pedropcamellon
Copy link
Contributor Author

Desktop (three variations, now with the right proportions)
1.
image

image

image

Mobile (two variations)
1.
image

image

@devarshishimpi
Copy link
Member

@Pcamellon Looks Great! Could you build the first one for both layouts?

@pedropcamellon
Copy link
Contributor Author

pedropcamellon commented Oct 10, 2022

I'm on it! I'll start with the mobile version. Which design you like the most? I think 1.

@pedropcamellon
Copy link
Contributor Author

pedropcamellon commented Oct 10, 2022

Sharing my progress.... I'm trying not to modify much from the current global styles:

image

I'm having trouble with getting that checkmark done :(

@pedropcamellon
Copy link
Contributor Author

pedropcamellon commented Oct 10, 2022

Done!
image

What do I do now?

@pedropcamellon pedropcamellon changed the title Minor changes to the landing page UI Change Newsletter section in Landing page Oct 10, 2022
@devarshishimpi
Copy link
Member

Is the background matching and looking good with the rest website content? Like the footer and the about section above it?

@pedropcamellon
Copy link
Contributor Author

I think it is. I have to remove a margin at the top of the footer section.

Mobile
image

Desktop
image

@pedropcamellon
Copy link
Contributor Author

Form will do nothing:
<form action="" class="newsletter__form text-center">

@devarshishimpi
Copy link
Member

Looks great @pedropcamellon Could you update with the latest branch, since the footer has been changed, and it would need a white background?

@devarshishimpi
Copy link
Member

Form will do nothing: <form action="" class="newsletter__form text-center">

That's fine, I'll add that later on.

@devarshishimpi
Copy link
Member

Looks great @pedropcamellon Could you update with the latest branch, since the footer has been changed, and it would need a white background?

Nvm don't change the color. but do sync with the main branch since there's a new footer added. Ofc even that has to be improved but better than the previous one

@pedropcamellon
Copy link
Contributor Author

pedropcamellon commented Oct 12, 2022

Can you guide me with that? I forked the project and worked on my copy in pedropcamellon/noteslify. What do I do after?

I tried this:

  1. Create a new branch
    image
  2. Make a new commit but I'm getting this:
    image
  3. In my settings I have no protection rules:
    image

@devarshishimpi
Copy link
Member

I can't find the branch for the same. Probably, write the code with the new footer at the bottom.
I have to change few settings in the footer as well, but I'll keep it as it is for now until your PR has been made.

@pedropcamellon
Copy link
Contributor Author

That's the thing. I dont know how to send my changes.

@devarshishimpi
Copy link
Member

That's the thing. I dont know how to send my changes.

I can't find your branch. Could you make a new branch in your fork and then commit all of them there? Or even works from your main branch of the fork.

@pedropcamellon
Copy link
Contributor Author

I couldn't commit because the branch appeared as protected. That was what I mentioned before. It get fixed, i dont know how. I made the commits, push changes and pull request.

@devarshishimpi
Copy link
Member

Good that's fixed.

@pedropcamellon
Copy link
Contributor Author

Can you please check what I did above? I dont have much xp with Github.

  • I forked the project and worked on my copy in pedropcamellon/noteslify. I'm seeing this:
    image

  • I made some commits:
    image

@devarshishimpi
Copy link
Member

Yes, all of those commits are perfect. Simply go back to your Github Code which you wrote. And then add your code back there. It seems like pulling from the main branch removed your code. Simply copy paste the code from your commits back into the repository code and check if everything is working fine. If yes, commit it to your fork. It will get updated here automatically.

@devarshishimpi
Copy link
Member

Wasn't yet completed

@MrKrishnaAgarwal
Copy link
Member

Okay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest Hacktoberfest hacktoberfest2022 Hacktoberfest 2022 hacktoberfest-accepted Hacktoberfest Accepted v2.0-roadmap Version 2.0 Roadmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants