Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add diff mode #229

Merged
merged 7 commits into from Mar 16, 2018
Merged

Add diff mode #229

merged 7 commits into from Mar 16, 2018

Conversation

tjvr
Copy link
Member

@tjvr tjvr commented Dec 9, 2017

Some early experiments at adding features for rendering "diffs".

  when flag clicked
+ repeat (10)
  move (10) steps
- turn ccw (9) degrees
+ turn cw (x position :: +) degrees
+ end
+ moo :: pen

scratchblocks

@tjvr
Copy link
Member Author

tjvr commented Dec 18, 2017

screen shot 2017-12-18 at 21 06 05

screen shot 2017-12-18 at 21 04 18

screen shot 2017-12-18 at 21 03 16

@tjvr
Copy link
Member Author

tjvr commented Dec 18, 2017

-move (10) steps
+move (10) steps
-say [Hello!] for (2) secs
+say [Hello!] for (2) secs
-play sound [meow] until done
+play sound [meow] until done
-set pen color to (0)
+set pen color to (0)
-set [moo v] to (0)
+set [moo v] to (0)
-add [thing] to cows
+add [thing] to cows
-broadcast [message1 v]
+broadcast [message1 v]
-wait (1) secs
+wait (1) secs
-ask [What's your name?] and wait
+ask [What's your name?] and wait
say (pick random (1) to (10))
say (pick random (1) to (10) :: +)
-make the cow moo :: custom
+make the cow moo :: custom

@aldreth
Copy link

aldreth commented Mar 16, 2018

@tjvr This looks great. Is there anything we can do at RPF to help move this on? The code on your PR looks pretty clear - what were you thoughts about next steps or changes that you'd like to make?

@tjvr
Copy link
Member Author

tjvr commented Mar 16, 2018

Hello! :) I think I'm still waiting for design feedback—it's not clear what the best design is here. Specifically the colors to use for the outlines and strikethroughs. (I think we're agreed on outlines for insertions, and strikethrough for deletions.)

@aldreth
Copy link

aldreth commented Mar 16, 2018

@tjvr Thanks - I'll chase!

@gregorywood
Copy link

Hello @tjvr! I'm a web designer at RPF. I have a little design feedback for you:

  • Using red as the outline or strikethrough is probably not a good idea because of accessibility considerations. Same goes for green.
  • Black feels like a logical choice - can we see a version with black outlines & strikethroughs?
  • Could we also perhaps see a version with black outlines and white strikethoughs please?
  • Also, is there a way to fade out the block that is being changed? Setting it at 50% opacity or similar would increase legibility further, I think.

@tjvr
Copy link
Member Author

tjvr commented Mar 16, 2018

Hey, nice to meet you :-)

is there a way to fade out the block that is being changed? Setting it at 50% opacity or similar would increase legibility further, I think.

We did consider that, but I'm concerned opacity won't look good when printed.

What do you mean by the "block being changed"? I can't imagine fading the inserted blocks would work well! :-)

@tjvr
Copy link
Member Author

tjvr commented Mar 16, 2018

    .sb-diff {
      fill: none;
      stroke: #000;
    }
    .sb-diff-ins {
      stroke-width: 2px;
    }
    .sb-diff-del {
      stroke-width: 3px;
    }

scratchblocks 5

    .sb-diff-ins {
      stroke-width: 2px;
      stroke: #000;
    }
    .sb-diff-del {
      stroke-width: 2px;
      stroke: #fff;
    }

scratchblocks 6

@tjvr tjvr merged commit fbf14d4 into master Mar 16, 2018
@tjvr tjvr deleted the diff branch March 16, 2018 19:42
@tjvr
Copy link
Member Author

tjvr commented Mar 16, 2018

I'm going to merge this experimental diff mode to master for now :)

@rik-cross
Copy link

Thanks @tjvr -- if this has been moved to master does that mean we can experiment with this new feature on https://scratchblocks.github.io?

@tjvr
Copy link
Member Author

tjvr commented Mar 19, 2018

@rik-cross I shall have to work out how to rebuild it first! :-)

Sent with GitHawk

@rik-cross
Copy link

@tjvr thanks! let us know if there's anything we can do to help, we'd love to be able to use this feature.

@tjvr
Copy link
Member Author

tjvr commented Apr 7, 2018

I added a dev page, where you can play around with the dev version :)

http://scratchblocks.github.io/v3.2/#when%20flag%20clicked%0A%2Bmove%20(10)%20steps%0A-move%20(10)%20steps%0A

@rik-cross
Copy link

@tjvr thanks for setting this up for us! 👍
It looks great -- I'll have a test this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants