Coder Social home page Coder Social logo

react-full-page's People

Contributors

dependabot[bot] avatar yurickh avatar zwug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-full-page's Issues

Add keyboard arrow support

How do you feel about adding keyboard arrow support to navigate between slides? I have implemented it and can pull request it!

Toggle functionality

As most of the scrolling is controlled by the package there should be a way of pausing/stopping the functions that are attached to the different events and return control of the scroll to the browser.

When opening a dialog on the page scrolling still happens on the background.
This also probably disables the functionality of any scrollable content that one might want to have.

My solution for now is to expose a boolean prop to the component which stops onScroll before it gets preventDefaulted.

'window is not defined' returned when building static HTML with GatsbyJS framework.

I have imported 'react-full-page' into my GatsbyJS build and everything runs fine local. When I run the build script which compiles all of my local data into static templates window object returns undefined from is-mobile.js

function isMobileDevice() {
  // return typeof window.orientation !== 'undefined' || navigator.userAgent.indexOf('IEMobile') !== -1;
}

Here is the full error log

error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

  10 | 
  11 | function isMobileDevice() {
> 12 |     return typeof window.orientation !== 'undefined' || navigator.userAgent.indexOf('IEMobile') !== -1;
     | ^
  13 | }
  14 | 
  15 | 


  WebpackError: window is not defined
  
  - is-mobile.js:12 isMobileDevice
    ~/react-full-page/lib/utils/is-mobile.js:12:1
  
  - FullPage.js:136 new FullPage
    ~/react-full-page/lib/components/FullPage.js:136:1
  
  - ReactCompositeComponent.js:295 ReactCompositeComponentWrapper._constructComponentWithoutOwner
    ~/react-dom/lib/ReactCompositeComponent.js:295:1
  
  - ReactCompositeComponent.js:282 ReactCompositeComponentWrapper._constructComponent
    ~/react-dom/lib/ReactCompositeComponent.js:282:1
  
  - ReactCompositeComponent.js:185 ReactCompositeComponentWrapper.mountComponent
    ~/react-dom/lib/ReactCompositeComponent.js:185:1
  
  - ReactReconciler.js:43 Object.mountComponent
    ~/react-dom/lib/ReactReconciler.js:43:1
  
  - ReactMultiChild.js:234 ReactDOMComponent.mountChildren
    ~/react-dom/lib/ReactMultiChild.js:234:1
  
  - ReactDOMComponent.js:657 ReactDOMComponent._createContentMarkup
    ~/react-dom/lib/ReactDOMComponent.js:657:1
  
  - ReactDOMComponent.js:524 ReactDOMComponent.mountComponent
    ~/react-dom/lib/ReactDOMComponent.js:524:1
  
  - ReactReconciler.js:43 Object.mountComponent
    ~/react-dom/lib/ReactReconciler.js:43:1

My template looks like this

import React from 'react'
import Link from 'gatsby-link'
import data from '../../data/index'
import { FullPage, Slide } from 'react-full-page';
import SlideshowControls from '../../components/SlideshowControls'

class LandingPage extends React.Component {

    render() {

        // Dynamically generate homepage grid images
        let projects = data.map( (project, idx) => (
            <article key={`project-${project.name}`} id={project.id} >
                <Link to={project.url} className="link primary"></Link>
                <img src={project.img} />
            </article>
        ));

        // Dynamically generate slideshow
        let sliderImages = data[1].slideshow.map( (img, idx) => {
            return(
                <Slide key={`image-${idx}`} style={{backgroundImage: `url(${img})`}} />
            )
        });

        const controlsProps = {
            style: {
                top: '50%',
                right: '20px',
                position: 'fixed',
                transform: 'translateY(-50%)'
            },
        }

        return (
            <div>
                <FullPage ref="slideShow" controls={SlideshowControls} controlsProps={controlsProps}>
                    {sliderImages}
                    <Slide>
                        <div id="main">
                            <section id="one" className="tiles landingPage">
                                {projects}
                            </section>
                        </div>
                    </Slide>
                </FullPage>
            </div>
        )
    }
}

export default LandingPage

License?

Hi, thanks for your great work! I'm just curious what license it has. I can't find about this info anywhere. thank you.

How to control the height of the Slide component in mobile view?

When it comes to mobile views, I've tried to adjust the screen height. The height is never changed from 100% to the desired height when I attempt it. In my case, I experimented with the innerHeight and outerHeight values of the Slide Component, but it didn't work.

I would appreciate it if you could add the feature or help.

Thank you!

My footer is not getting in the right place!!

While using this package I realized that my footer is getting set on the second section(i.e: Second Scroll) of the page. Whereas it should be at the bottom of the page.
I have some code that shows my problem on CodeSandbox.
Also, a StackOverflow question of the same.
Please check this, is there any alternative or any possible solution for this??

Please take a look.

Thank you!!

next.js FullPage.getChildrenCount calculation error

i have a problem when i use with next.js.

  • when i saw react-full-page source code, i understand that the code compare with children and Slide then pass the same element's length to _slideCount. and we can slide as _slideCount's size
       - 2018-05-22 1 25 42

but, when i run my code with next.js, the next.js pass another value to the children in my code (Slide).

  • this is children's shape
       - 2018-05-22 1 19 02

  • this is _Slider.default shape
       - 2018-05-22 1 19 26

So, _slidesCount is 0 becauseof the difference of each component's shape.
And the slide does not work.

please help🙏

WebpackError: window is not defined when builded in Gatsby

Hello Guys!

I'm having a problem using react-full-page in gatsby project. When the project is builded the follow message is presented:
build-error

During development react components are only run in the browser where window is defined. When building, Gatsby renders these components on the server where window is not defined. So, do we have some way overcome this error?

I think if we check if windows exists (typeof window !== 'undefined') in line 8 can fix it.

Scroll doesn't work on Chrome

Hi,
I wanted to do a full page scroll in Gatsby and it doesn't work here's the default component and its scroll implementation:

import React from "react"
import { FullPage, Slide } from 'react-full-page';

function index() {
  return (
    <div>
      <FullPage scrollMode>
        <Slide>
          <h1>Inner slide content</h1>
        </Slide>
        <Slide>
          <h1>Another slide content</h1>
        </Slide>
      </FullPage>
    </div>
  )
}

export default index

When I try to scroll with the mouse, nothing works.

Scroll normally after last section?

Hello -- great plugin ... we use it a lot! We are using react-full-page in vertically-scrolling one page at the top of a website but would like the rest of the site content to scroll normally once the last section of the fullpage is viewed. Is this possible?
the effect like this,you scroll the last section,the content is normally scroll.
https://www.espasso.com/storefront/test

when the slide component is set as height:auto, cant scroll down smoothly

Let's say I have 3 sections which are set as height:100% which is default set from the react-full-page. and 1 footer.

It scrolls down well till the last section However, when its scrolling down from the 3rd section to the footer which is set as height:auto by me since I don't want it to be 100%, It seems like It doesn't scroll down smoothly. but When I scroll up from the footer to the 3rd section, it scrolls up smoothly.

Is there any idea why its like this??

thank you.

Choose a license

This project seems really nice! I suggest that you choose a license for it to allow other people to use it in their projects, MIT e.g.

Cheers!

why it can not work?

i don not konw why ,
I have tried many times
but still can not work

code =>

import { FullPage, Slide } from 'react-full-page';
const App = () => (
<FullPage controls>
      <Slide>
        <h1>Inner slide content</h1>
      </Slide>
      <Slide>
        <h1>Another slide content</h1>
      </Slide>
      <Slide>
        <h1>Anotdsadher slide content</h1>
      </Slide>
    </FullPage>
);
 

"react-full-page": "^0.1.11",

Configure sensitivity?

I'm on macOS and on your demo site, http://zwug.github.io/react-full-page/, I find it hard to scroll to 3rd or 4th slide and I always end up overscrolling past the slide that I want. I'm not sure if it's due to the inertial scrolling from my OS, but is there a way to change the scroll sensitivity?

Scroll not working for ie11

Hello.
In ie11 your library does not work. There are no errors, but when scrolling or during the transition, the page always seeks to the top

How use getCurrentSlideIndex?

Hi. I need to get current slide number. I know that we have getCurrentSlideIndex but I don't know how use it. Could you show me that in example?

Please point me out how to adjust the scroll duration?(NOT A ISSUE, IM JUST A NOOB)

First of all, thank you for providing a great fullpage solution.
It's not an issue or bug, i have no experience with "React" and cindfully asking for help.
Can you please point me out, how I can adjust the scroll duration?

  • "React-Full-Page" installed as "npm".
  • "FullPageExampleRef" used as a template.

It's a stuiped request, but if by any chance you would have time to help me out with this, it would be really great.
Sorry for bad english, my native language is russian.
Thank you in advance for your attention.

Can't change _slidesCount when fetching new data

Hey, thanks for a good tool

Can you please explain one thing: when I initialize app, component FullPage contain 2 children, then I fetch new data and in FullPage becomes 4 children, but variable _slidesCount doesn't change. Even if I pass slidesCount manually depending on the size of the children inside, _slidesCount doesn't change. How can I fix this? Thank you.

Help in learning how to use Help in learning how to use scrollToSlide

My slides are separate from FullPage> Slide
My slides look like an array with const contentPage: () => [JSX.Element, ...] = () => { return [(<div id="0" className="content">),(...)]}
The component itself looks like this
<FullPage beforeChange={(e) => this.setState({ step: e.to })} controls> {contentPage.map(() => <Slide />)} </FullPage>
When scrolling, I drill a number from beforeChange and switch to a page whose id matches the number taken from beforeChange.
My problem is that I cannot use the third party menu when I want to switch to another page
I switch but the step in the slide remains the same

I am waiting:
When I click on the button of my menu, which will scroll to the page with a specific id, in FullPage the step will also change to the number that I selected

I looked at your files and did not understand how I can transfer the scrollToSlide number to FullPage

Integrating my own controller?

Can you tell me how I can integrate own controller?

The problem I have right now is I am using a different component which scrolls to "anchors". However the problem with such configuration is that I can go to the anchor/page with my own controller but any mouse scroll references the page that react-full-page was before and not necessarily the page I am now. Is there a way to manually set the current page so my other controllers and this one have the same "currentPageState"?

Scrolling is not smooth

Hi,

Is this normal that there's some lag when scrolling? It looks like the animation is limited to 15 fps.

Regards

How scrollToSlide works?

Hi there.
I read your documentation but didn't understand how to use scrollToSlide.
Can you explain it to me and with an example?
I have to say that I'm building navigation without passing it to control prop, but I want to handle onClick for each controller to scroll on that section.

Module not found: Can't resolve 'core-js/modules/es6.array.iterator'

Trying to use the library in a CRA (Create React App)

Failed to compile.

./node_modules/react-full-page/lib/components/Slide.js
Module not found: Can't resolve 'core-js/modules/es6.array.iterator' in 'landing-1/node_modules/react-full-page/lib/components'

Version : 0.1.8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.