Git Product home page Git Product logo

choices's Introduction

choices's People

Contributors

spicy-wolf avatar dependabot[bot] avatar

Watchers

 avatar

choices's Issues

Change URL query params

  • owner
  • repo
  • branch (optional)
  • release (optional) <= zip file download
  • token (optional) <= github token

Add a setting page to main page

refactor the main page to contain sub pages

  • library
    • all existed reps
    • add button
  • setting
    • same as the setting panel in the reading page

use Mui drawer + react router

Support onedrive file picker

either v7 or v8, so that a user can pick script from onedrive

furthers, if possible, a user can also backup the local indexdb to remote

Add appear animation to content items

when insert a new item, use css to show animation

@keyframes appear-animate {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

then use

animation: appear-animate 0.3s linear;

Remove id from reading log

seems like the reading log id is not ready necessary.

as design, the composite key [savedataId, order] must be unique. and this can also benefit the ordering. because the "order" is part of the key, the selected results are automatically ordered

In addition, if a new save data is stored and new GUIDs are generated for all reading logs, then we have to update the save data logCursorPos.

In this case, it would be better to remove the reading log id and logCursorPos stores the order number

a statement can be executed more than once

useEffect(() => {
const newVirtualItems = virtualizer.getVirtualItems();
if (JSON.stringify(newVirtualItems) !== JSON.stringify(virtualItems)) {
setVirtualItems(newVirtualItems);
}
}, [virtualizer.getVirtualItems()]);

the virtualItems keep changing which triggers statement execution muti-times without next statement id up to date.

the virtualItems is not relayable, only the last index of virtualItems is need for fetching

Add welcome popup

as a user, if the given URL without any params, then show a popup

  • textbox: author (owner)
  • textbox: repository
  • textbox: tree_sha (optional, default master)
  • blob uploader

Implement store reading log pos

As a user keeps scrolling the screen, the read log position should be updated.

Note: the position is always the element which is on the top of the screen.
Technically, the top pos <= 0, bottom pos >= 0.

Investigation on indexeddb to update nested array

idea:
design the save data table like this:
row#1:

{id: 123, timestamp: 123456, data: {...}, readingLog: [{...log1..,}, {...log2...}]}

in this case, how to push directly into readingLog, which is a nested array of records.

the pros of this design are that no need to have a one-2-many relationship btw save data and readingLogs.
otherwise, two solutions

  1. replace the whole readingLog each time update save data
  2. have a separate table for readingLog. however, this needs one-2-many relationships

[Bug] maximum update depth exceeded

in Content.tsx

  1. load a statement
  2. execute the statement
  3. render the result
  4. if reach the bottom of the screen, done; otherwise, go back to step1

this is similar to CPU instruction cycle, however, this can cause "maximum update depth exceeded" if its a big screen and load many statements.

Change scriptCursorPos to point to next script record

Currently, the scriptCursorPos points to the script which was executed in prev round. However, this is not a good design for the Choice component, Jump component, etc since these components' execution results are not stored in the DB.

To have scriptCursorPos always pointed to the next script means the pointed script is not executed yet.
In this case:

  • The Jump component can set the scriptCursorPos directly.
  • The Choice component and the Ending component will generate a pending state
    (a pending state means the script execution will be paused)

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.