Comments (2)
I have restored the CSS for .file_content and the new file now has correct size.
However, it is still resizeable, and it does not have line-numbers.
I think the relevant previous commits related to line-numbers are
a1301fe
Date: Tue May 22 10:15:21 2018 +0100
and in particular
2255220
Date: Tue May 22 12:05:30 2018 +0100
from web.
Fixed. The problem was naive code like this in app/views/kata/run_tests.js.erb
<% @new_files.each do |filename,content| %>
cd.newFileContent("<%= filename %>", "<%= content %>");
<% end %>
which was simply not expanding to legal js code when the content was multi-line.
At first I fixed using js_partial, eg
$("#visible-files-container").append("<%= js_partial('new_files') %>");
which uses js_partial() in app/helpers/application_helper.rb
def js_partial(partial)
escape_javascript(render :partial => partial)
end
But now it looks like this...
<% @new_files.each do |filename,content| %>
cd.newFileContent("<%= j raw(filename) %>", "<%= j raw(content) %>");
<% end %>
The raw() call is so that, for example, a " in a filename does not appear as "
The j call is an alias for escape_javascript
from web.
Related Issues (20)
- decouple test run from saver HOT 1
- poor UI when you enter wrong ID HOT 1
- poor font choice for entering ID
- Help to recover my code in cyber-dojo, Thanks HOT 1
- drop option to turn off line-numbers
- make colour syntax option a single button
- hoverTips don't work on the footer HOT 1
- Different favicon.ico files HOT 1
- scrolling a long diff line reveals lost background colour
- Improved design for file new|rename|delete HOT 1
- update to newer version of CodeMirror
- On kata/edit page fix broken CSS layout when you zoom to 120%
- new fork option: new animal (in a group session)
- Make review page and test page UX's more similar?
- Control which new/changed files appear HOT 1
- revert-when-wrong toggles (when predict is checked) not showing on v2 katas HOT 1
- Add CSS to make size of review box responsive to browser resizing
- Rationalize handling of readme files in UX
- Add more blurb to opening dialog box
- Add all-white-blubs traffic light for starting 'zeroth' files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.