Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

[dapp-high-roller] High Roller MVP Interactive #271

Merged
merged 36 commits into from Nov 30, 2018
Merged

Conversation

Alonski
Copy link
Member

@Alonski Alonski commented Nov 27, 2018

Description

Got parity with the High Roller HTML:
http://highroller.byjohnmichael.com/index.html

Still Not Finished

I am not sure exactly how to test all of this using Stencil and the way they use Jest/Puppateer.
Shadow DOM is a bit tricky

display: flex;
margin-top: 1rem;
}
.actions > * + * {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Alonski Isn't this selector a bit too greedy?

Copy link
Member Author

Choose a reason for hiding this comment

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

While I agree the CSS was taken from the HTML provided. I pretty much used it as is and broke it up into components. From what I understood from @ebryn I wasn't meant to spend too much time on styling and CSS.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind this for now then :)

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

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

@Alonski These SVGs files could be minified. You can use something like svgo to do it.

Copy link
Member Author

@Alonski Alonski Nov 29, 2018

Choose a reason for hiding this comment

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

Maybe we should split this into a new task. Maybe onBuild we can optimize this
Something like this:
https://github.com/ivanvotti/ember-svg-jar

position: relative;
width: calc(100% - 2.5rem);
margin: 2.5rem auto;
box-shadow: inset 0 -1px 0 0 #00d49f, inset 0 0 6px 0 rgba(0, 0, 0, 0.5);
Copy link
Contributor

Choose a reason for hiding this comment

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

@Alonski You might want to use $variables to keep color definitions as consistent as possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above but possible.

const rematchBtn = profileElement.shadowRoot.querySelector(
".btn.btn--rematch"
);
console.log(exitBtn.textContent);
Copy link
Contributor

Choose a reason for hiding this comment

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

@Alonski Maybe we can remove this console.log?


handleRoll(): void {
this.myRoll = [
1 + Math.floor(Math.random() * Math.floor(6)),
Copy link
Contributor

Choose a reason for hiding this comment

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

@Alonski We can probably abstract this into a getRandomNumber() function:

const getRandomNumber = (max) => 1 + Math.floor(Math.random() * max);

and then use it as:

this.myRoll = [getRandomNumber(6), getRandomNumber(6)]

Also you can go further and have a getRoll() function that builds the array for you.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is currently boilerplate code that will be thrown away once we integrate with a smart contract. I can do this though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't sweat it. Let's get this merged asap :)

@Alonski
Copy link
Member Author

Alonski commented Nov 30, 2018

Seems that the issue with tests failing is related to CircleCI running out of memory with the the Kill 137 exit code.
Apparently there is a 4GB memory limit that we are hitting.
https://discuss.circleci.com/t/kill-signal-problem/18665/6
https://discuss.circleci.com/t/build-ending-with-received-killed-signal/20610
https://support.circleci.com/hc/en-us/articles/115014359648-Exit-code-137-Out-of-memory (

@ebryn ebryn merged commit c514bfe into master Nov 30, 2018
@snario snario deleted the alon/high-roller branch January 3, 2019 19:25
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