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

💻 variable list appearing automatically #5481

Closed
wants to merge 9 commits into from

Conversation

JoseArtur
Copy link
Contributor

Fixes #5408 variable list appearing automatically

Now, the variable list is not shown automatically after every run.

the variable list appears when debugging (running step by step with the ladybug), but not when running normally.
the variable list appears only a short amount of time (5 seconds) and then it hides again. Users can view the list again by clicking the label icon.

I also put an option that makes all the variables still appearing even if the list is long (before we use to have an overflow variable problem when the variable list was bigger than 20.

How to test

name is Hedy age is 15 print name is age years old

Case 1

  • if you press "Run code", the variables will not appear, but the tag to see the variables will.
  • If you press the tag, the variables will now appear

Case 2

  • if you press "🐞" for the debugging mode, the variables will appear automatically for 5 seconds and then disappear again

Demo
ezgif-5-e2d64c36e2

Case 3
If you have a big variable list, now you can scroll the list to see all the variables

How to test

name is Hedy age0 is 15 age1 is 15 age2 is 15 age3 is 15 age4 is 15 age5 is 15 age6 is 15 age7 is 15 age8 is 15 age9 is 15 age10 is 15 age11 is 15 age12 is 15 age13 is 15 age14 is 15 age15 is 15 age16 is 15 age17 is 15 age18 is 15 age19 is 15 age20 is 15 age21 is 15 age22 is 15 age23 is 15 age24 is 15 age25 is 15 age26 is 15 age27 is 15 age28 is 15 age29 is 15 print name is age0 years old

Demo

ezgif-5-a3932576ec

Copy link
Contributor

@hasan-sh hasan-sh left a comment

Choose a reason for hiding this comment

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

Hello @JoseArtur and @bellacolombarolli00 ,

This is an amazing PR and thank you soo much for contributing:)) There's two things to consider:

  • could you please revert the changes in editor-and-output.html and add only the code you changed? Because now there's so many that i don't know which pieces you've changed. Or did you make all of these changes?
  • Also, would it be possible to eliminate the button at the bottom and just have the variables horizontal line that opens up once clicked?

The same logic you've introduced, and when there's variables we show:

Screenshot from 2024-05-01 13-28-57

Then once clicked:

image

Another thing is that when you change the current adventure, the variables are still there and not cleared out. We should also account for this scenario.

Do you think you could do this?

class="hidden flex-0 z-20 mt-0 bg-yellow-100 border-b-4 border-yellow-500 rounded-b text-yellow-900 px-4 py-3 shadow-md">
{{_('submitted_header')}}
class="hidden flex-0 z-20 mt-0 bg-yellow-100 border-b-4 border-yellow-500 rounded-b text-yellow-900 px-4 py-3 shadow-md">
{{ _('submitted_header') }}
Copy link
Member

Choose a reason for hiding this comment

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

I think you used a tool to autoformat here? Maybe your IDE does that accidentally? But this (as Hasan explained) makes it harder to review the PR, so if you can revert it, please do!

@Felienne
Copy link
Member

Felienne commented May 2, 2024

Hi @JoseArtur! We want to build on top of this tomorrow so we have gone ahead and made the needed changes in #5481.

Still thanks a lof for the work!!

@Felienne Felienne closed this May 2, 2024
mergify bot pushed a commit that referenced this pull request May 2, 2024
Same work done in #5481 with some minor changes (see comments). Also, we really needed this PR to be merged, therefore, we created a clone version.

So, credit to @bellacolombarolli00 and @JoseArtur!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💻 variable list appearing automatically
4 participants