Fixing a bug on Mozilla Thimble

Tools:

  • NodeJS
  • Vagrant
  • GitBash
  • Virtual box

 

#1  Install brackets

1 Fork the brackets on

https://github.com/mozilla/brackets

 

2 Clone to your own computer

git clone –recursive git@github.com:{your-username}/brackets.git

Remember to have –recursive to get all sub-module.

 

3 Start npm to host brackets

 

cd brackets

npm install

npm run build

npm start

It may take some time to finish. Once it finishes, it should show the follow message.

捕获.PNG

Goto

http://localhost:8000/src/hosted.html

You should see your bracks has been installed.

If this error message shows up. You should try another computer.

捕获.PNG

 

 

#2 Install thimble

  1. Install vagrant and virtual box
  2. Fork thimble here https://github.com/mozilla/thimble.mozilla.org
  3. Clone using this command

git clone git@github.com:{your-username}/thimble.mozilla.org.git

vagrant up

success.PNG

3500.PNG

#3 Fixing bug

Here is the bug I want to fix.

https://github.com/mozilla/thimble.mozilla.org/issues/1631

The editor doesn’t remember the Allow JavaScript toggle setting. If I turn it off, when I refresh, the toggle is still on.

To do this, we can find something similar to this issue.

First of all, I play around the thimble. Beside the allow java script toggle, there is a word warp toggle. This toggle can remember the setting.

Then I search “word wrap” in github. I found the following pull which is similar with my issue.

https://github.com/mozilla/brackets/pull/378/files

I learned and add codes to support remembering the allow javaScript toggle backend.

modify.PNG

 

Now, the back-end part has been done.

 

We still need to use this property when the UI is initializing on thimble.

Use inspect to get the toggle ID.

Search the ID and we finally locate bramble-menus.js

Here is the code to initializ the UI.

https://github.com/mozilla/thimble.mozilla.org/pull/1725/files

Finally the has been fixed. When I refresh the page, it remembers the setting.

Capture.PNG

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s