[dapp-high-roller] High Roller MVP Interactive #271
Conversation
Passing state was broken
display: flex; | ||
margin-top: 1rem; | ||
} | ||
.actions > * + * { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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)), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
Seems that the issue with tests failing is related to CircleCI running out of memory with the the |
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