Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Console presentational component #704

Merged
merged 12 commits into from
Aug 2, 2018
Merged

Console presentational component #704

merged 12 commits into from
Aug 2, 2018

Conversation

mrniket
Copy link
Contributor

@mrniket mrniket commented Aug 1, 2018

This PR adds the Presentational console component as per UX/UI guidelines. Notable bits of logic:

  • When the user scrolls to the bottom, the console log sticks to the bottom
  • When the user scrolls up from the bottom, we don't jump the user to the bottom

Also added in this PR is the ability to use class properties


This change is Reviewable

Copy link
Contributor

@mossjacob mossjacob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9 of 15 files at r1.
Reviewable status: 9 of 15 files reviewed, 1 unresolved discussion (waiting on @mrniket)


game_frontend/src/components/LogEntries/index.js, line 21 at r1 (raw file):

    const logEntries = this.props.logs.map(logEntry =>
      <LogEntry
        key={logEntry.timestamp}

how are we intending timestamp to be calculated? is it sent from the backend? is it epoch milliseconds or similar?

Copy link
Contributor

@OlafSzmidt OlafSzmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 16 files reviewed, 3 unresolved discussions (waiting on @mrniket)


game_frontend/src/components/IDE/index.js, line 12 at r2 (raw file):

logs={[]}

Mind explaining this further? This is a placeholder for props passing?


game_frontend/src/components/IDEConsole/snapshots/index.test.js.snap, line 17 at r2 (raw file):

        Object {
          "log": "bye",
          "timestamp": 2,

Why is this timestamp 2 and the above one a string? Is there no prop checking?

Copy link
Contributor Author

@mrniket mrniket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 16 files reviewed, 3 unresolved discussions (waiting on @mrniket)


game_frontend/src/components/IDE/index.js, line 12 at r2 (raw file):

Previously, OlafSzmidt (Olaf Szmidt) wrote…
logs={[]}

Mind explaining this further? This is a placeholder for props passing?

you can look at the Proptypes for IDEConsole :) but a TLDR is that the IDEConsole expects a list of logs


game_frontend/src/components/IDEConsole/snapshots/index.test.js.snap, line 17 at r2 (raw file):

Previously, OlafSzmidt (Olaf Szmidt) wrote…

Why is this timestamp 2 and the above one a string? Is there no prop checking?

ah good point, I'll add it


game_frontend/src/components/LogEntries/index.js, line 21 at r1 (raw file):

Previously, JCobbles (Jacob Moss) wrote…

how are we intending timestamp to be calculated? is it sent from the backend? is it epoch milliseconds or similar?

It will be done/decided in the next task when we connect it to the redux store, for testing I generated it in an epic.

Copy link
Contributor Author

@mrniket mrniket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 16 files reviewed, 2 unresolved discussions (waiting on @OlafSzmidt)


game_frontend/src/components/IDEConsole/snapshots/index.test.js.snap, line 17 at r2 (raw file):

Previously, mrniket (Niket Shah) wrote…

ah good point, I'll add it

Done.

Copy link
Contributor

@OlafSzmidt OlafSzmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 14 of 15 files at r1, 1 of 1 files at r2, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Contributor

@mossjacob mossjacob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@OlafSzmidt
Copy link
Contributor

Tests broken due to outdated snapshots. I'll take care of them and we can merge

Copy link
Contributor

@OlafSzmidt OlafSzmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@OlafSzmidt OlafSzmidt merged commit 9e9cc5a into master Aug 2, 2018
@OlafSzmidt OlafSzmidt deleted the console_component branch August 2, 2018 10:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants