Code Monkey home page Code Monkey logo

zine's People

Contributors

dependabot[bot] avatar kevinhaube avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

zine's Issues

Template-as-element generation process

Problem statement

A single page configuration will include a unique ID mapped to a desired template. This id should be used to generate a component that can be rendered, and provide the necessary props from the configuration to this component.

Additional considerations

We should throw if the templateId is not a valid enumerated TemplateName.
We should throw if the necessary props are not provided to the generator.

AC

  • Enumerate template names
  • Map template names to a template component generator (throw if Map.get() returns undefined)
  • Generator should return a component with props, or throw if props are not valid

The `ZineCover` context provider

Problem statement

There needs to be a layer controlling when the next page of a Zine becomes available. To do this, the ZineCover context provider will handle fetching the active zine config from the API, and allowing access to each next page as the current triggers it.

AC

  • Mock the fetching behavior by importing the module you create for the proof of concept in #3
  • Provide availablePages to consumers of the context
  • Provide a way to trigger the next pages availability that ZinePage templates can call once their timeout is up

The `usePageTimout` hook

Problem statement

Photography is meant to be cherished. This timer hook will make a user wait with the image in-view for a designated timeout, thus forcing them into slowing down. This is the whole reason I'm making this thing.

Additional considerations

This should start the timer when the view is the page in view. The timer should reset whenever the page leaves the view as a default behavior. An override can be provided to instead pause the timer.

AC

  • Timer hook uses an idle timeout to trigger the next pages availability (see ZineCover in #4)
  • The timer resets by default when the component leaves the view
  • The timer can be overridden to pause/resume on this action

Update README with app breakdown

The README should address the following things:

  • An overview of how the front-end works and why
  • Intent to receive data from self-rolled firebase-based service
  • How the ZinePage ecosystem is planned to work
  • Stack and tech specs?

The `ZinePage` configuration

Problem statement

A Zine needs to be able to feed in an array of page configurations to be rendered as ZinePages.

These configurations can include the following parameters for the corresponding purpose:

  • images: array of one or more images to render on the page
  • captions: array of caption c
  • viewTimeRequirement: the amount of time usePageTimer() will wait before allowing the next page to render
  • templateId: the unique ID for the template to render

AC

  • Create necessary classes to create ZinePageProps
  • Create an empty ZinePage component that can take ZinePageProps

Generate a logical or block component

Reference: https://daveceddia.com/react-cli-with-bash/

Problem statement

Now that the framework is fleshed out, I want to package a CLI with it so no manual file creation is necessary. In this ticket, components (both logical and block) should be created and added to their directory's index files.

AC

  • Script for template and component generation
  • Script adds new components to indexes

The `MainFrame` (default) template

Problem statement

Much like a framed photo, most galleries or zines start with a basic layout -- one image on one page. For the MVP, this will be our default template. A later release will introduce more template options.

Screenshot 2022-08-19 233428

AC

  • Single image is fit to the page with ample whitespace
  • Template has accompanying generator function
  • Template can be used by ZinePage without error

Generate a template

Problem statement

Through the command line, I need to be able to generate a file for the template directory. This should include a directory named after the template, the template file with a generator and empty rules array exported, and all necessary bits added into the templates index file.

AC

  • Generate a template file with exports
  • Add exports to index

Generate an extension hook

Problem statement

Through a command line, I need to be able to generate extension hooks and add them to the indexes in extension-hooks and framework.

AC

  • Generate new extension hook from CLI
  • Add hook automatically to indexes

Update scroll behavior to snap-scroll between pages

Problem statement

To lock people into my very specific way of having them view my online zine, I will prevent free scrolling. Instead, users will snap scroll between pages.

AC

  • Snap scrolling behavior across all devices

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.