Code Monkey home page Code Monkey logo

alea's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar jsonnull avatar krisaoe avatar wittyadrian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

alea's Issues

Improve roll command in messages

This is a map of desired improvements to the /roll command for chat

  • Show the dice being rolled
  • Show +, -, = in result
  • add +/- modifiers
  • add /r shortcut
  • Add an icon on the left perhaps? I'm thinking this one since we're already using FA
  • Highlight critical successes/failures in gold and red respectively
  • add "keep highest" and "drop lowest" variants

Ensure GraphQL subscriptions are canceled properly from their resolvers

Calling the unsubscribe function returned by props.data.subscribeToMore should properly cancel subscriptions at the resolver level where they're created. Not doing so will leak running subscriptions each time they're instantiated, although Firebase may currently dedupe those subscriptions at the network level.

Lazy load user sessions list

Right now the user.data part of the state tree is required before the app finishes loading, because this contains the user's current session info.

Since the sessions revamp, the current session variable has been removed.

As such user.data can be renamed to user.sessions, and this can be lazy-loaded in the background.

Add sent message history functionality

When focused on the input to send messages, using the up arrow on the keyboard cycles through previous messages, allowing you to use/modify recent rolls more quickly.

Down arrow performs the inverse of this if the user has used the up arrow to insert a previous message.

Unfocusing (blurring) the chat textarea resets this feature.

Remove old redux-saga code

Most or all of the redux-saga code is no longer needed

  • loginFlow (#80)
  • loadUserProfile/saveUserProfile (#78)
  • loadUserPreferences/saveUserPreferences (#78)
  • sendMessage/commandParser (#77)
  • saga code from integration tests
  • remove the dependency

Wait for user preferences before firing 'APP_FINISHED_LOADING' action

Currently user preferences load in the background after the app has finished loading. Unfortunately this means if you're using the dark theme, you'll get a flash of light screen after the app loads but before your preferences have registered.

To fix this, let's hold off on firing APP_FINISHED_LOADING until a call to HYDRATE_USER_PREFERENCES has been made.

Come to think of it, that won't work if the user is not logged in (preferences will not load), so we'll need to consider a way around this for the time being.

[RFC] Ensure display name uniqueness across the entire platform

I see three major ways forward:

  1. Allow duplicate display name text and use a tag to differentiate between duplicates in the client. Discord does this. Looks like Jason#1234.

  2. Do not allow duplicate display name text and make display names first-come-first-serve. Using this strategy, we can still allow users to have a custom display name per game they are a member of. A complication with this strategy is that we would also have to consider allowing users to have a custom photo to accompany each username, which I do not think would scale well.

  3. Just allow duplicate display names.

I'm looking forward to comments and further ideas.

Show exact time message was sent on hover

Right now you can only how long ago a message was sent, but often you want to see when a user sent a message which was not recent.

If possible, add an alt attribute to the messages relative time which displays the messages exact date and time on hover.

New settings page

Settings will become a separate page instead of a modal.

Settings page will have tabbed navigation with the following controls:

  • Profile
    • displayName
    • avatar
  • Preferences
    • theme

From anywhere in the app, hit 'Enter' to focus the chat

Since chatting and rolling are so frequent, it would nice to be able to focus the chat box automatically—I think receiving 'Enter' would be ideal.

One problem: We don't want enter to focus the chat if the user is editing something else.

I propose adding a variable to the redux UI state branch called isEditableFocused, and creating two actions: { type: UI_EDITABLE_FOCUSED } and { type: UI_EDITABLE_UNFOCUSED } which will set isEditableFocused to true and false respectively.

When isEditableFocused is true, an 'Enter' key press will not focus chat.

To close it out, ensure that the generic Editable component dispatches these actions when focused and blurred.

Add game page features

Missing features for the game view

  • Name field editable
  • Description field added, editable
  • Settings panel in sidebar for game owner
  • Participants list
  • Participants last seen
  • Invite link creation
  • Invite link acceptance (blocked on #74)
  • Chat username from participants list, and load user profile
  • Re-add command parser which previously lived in sagas

Static frontpage

Tracking issue for a static frontpage.

Background

Currently the app is served at a single endpoint, /index.html. The goal is to serve a statically rendered index.html and direct logged-in users to a dynamic /app.html.

The redirect/rewrite scheme will be this:

Server-side rewrites

  • / -> /index.html
  • /* -> /app.html

Breakdown for users and login state

  • / -> User is served index.html, follows links to access logged-in home (/games)
  • /* -> User is served app.html, app waits for login state and redirects to /login if logged-out

Todos:

  • Separate index.html and app.html endpoints
  • Modify Firebase hosting route configuration for new html endpoints
  • Add code-splitting so homepage does not load non-essential components
  • Statically render homepage during CI build

Sessions view updates

Sessions view is need of a visual overhaul as well as new features

  • Create game integration
  • Show game owner's name on each game
  • Better padding and fixed-width layout

Refine testing strategy

I may have gone a little too deep on testing the first time! Snapshots update often and components change often, requiring tests to change every time a component changes.

Generate link preview image on CI

Currently hero.png lives in-repo, but I'd rather generate these images during the build process so they don't have to be in the repo.

Todos:

  • Remove assets.js, as it currently only imports the in-repo image.

Migrate to Cloud Firestore

This is a tracking issue for the migration to Firestore.

Firestore is a beta NoSQL database provided by Firebase which offers support for collections, queries, and a variety of data types. I expect it to provide a better long-term developer experience and will open the door for more features to be added.

Todos:

  • Migrate sessions listings
  • Migrate user preferences
  • Migrate messages
  • Secure database with access rules

Intelligently merge chat messages on Firebase connection reset

When a Firebase connection is established, a set of the most recent chat messages are loaded and pushed into the Redux store.

This happens on load, but unfortunately also happens if the connection is reestablished, such as after a period of inactivity or if the internet connection is reset, meaning the messages are loaded and inserted into the Redux store, which already contains messages, resulting in duplicates.

A solution would be to prevent duplicate messages from being inserted in the reducer.

Add default display name

Currently the display name is empty if one has not been set, meaning messages in chat will not show a sender.

The display name can default to the email address the user registered with for the time being. In the future, this will need to be changed and the user will be required to enter a display name, for privacy considerations.

UI updates and refinements

A tracking issue for multiple small details and bugs in the UI which need fixing.

Improvements

  • create button transition base class and apply to all buttons
  • create CSS animation presets we can choose from for animations

Changes

  • dark theme header should match the sidebar panel in game (secondary gray background instead of blue)
  • update settings modal—we need to decide on a wider and taller modal or a sidebar which pulls out

Bugs

  • 1px border on chat compose area causes it to move when pinning/unpinning sidebar, fix by adding white border on unpinned version
  • home and settings buttons in top header do not take up the full height available, which looks weird
  • fix settings transition edge cases (only transitions in correctly on first try)

New login view

Login view is missing a lot of necessary features

  • Visual update
  • Informative errors
  • Forgot password link
  • Redirect-to state (#74)
  • Remove loginFlow saga

Add generic tooltip component

Adding a generic tooltip component will help users to learn functionality of items in the user-interface by progressively revealing details and functionality which might not be otherwise apparent.

Impose limit on number of members in a game.

To keep games from being too full and keep performance expectations realistic, a limit should be imposed on the number of members which may have access to a game. I'm thinking 12 to start with, and leave open the possibility of raising this in the future.

Fix broken sub-dependency in travis build.

There's been an error in the travis builds when running Flow:

Error: node_modules/protobufjs/src/bower.json:4
  4:     "version": /*?== VERSION */,
                                    ^ Unexpected token ,

I'm not able to reproduce as this particular bower.json dependency does not exist on my installation. I'm really not sure why this is here.

I've fixed this temporarily by removing the file in the before_script section of the travis config. Hopefully this file goes away at some point and that config can be removed.

Remove react-router-redux

Since the app uses graphql now and a lot of internal state is no longer kept in redux, it's no longer useful to have the router location in the redux store. As such, we can remove react-router-redux.

Todos:

  • Get rid of any existing uses of push() action
  • Remove dependency

Defaults on Firestore data and strategy for migrating types

Right now we're prone to errors on the frontend when fields are added and expected to be present. There needs to be a way for users/games to migrate their data forward when new fields are added.

The strategy going forward will be to have the API respond with defaults for fields which are not present. To enforce this, we'll re-use Flow types currently referenced on the frontend (DBUser, DBProfile, etc.) to type the defaults values.

When entire documents are not present, the API should attempt to write a full set of defaults and then return this value. If this fails, a more specific error can be sent to the client than doc does not exist. I think this may only apply to user details like profiles, preferences, etc.

Add default types

  • User profile
  • User preferences
  • User games
  • Game info

Attempt to write defaults for users if not present

  • User profile
  • User preferences
  • User games

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.