mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 10:21:41 +03:00
Make table default visualisation (#10128)
Makes table the default vis type. Before: ![image](https://github.com/enso-org/enso/assets/1720119/8a5d113a-ac06-4dd8-afdb-151cdbc149ab) After: ![image](https://github.com/enso-org/enso/assets/1720119/d7c33cf7-355d-4517-8967-1963ff506f97) Closes #10093
This commit is contained in:
parent
500e39810f
commit
af4177e61f
@ -10,9 +10,13 @@ import project.Table as Table_Visualization
|
||||
from project.Text import get_lazy_visualization_text_window
|
||||
|
||||
## PRIVATE
|
||||
Specifies that the builtin JSON visualization should be used for any type,
|
||||
Specifies that the builtin Table visualization should be used for any type,
|
||||
unless specified otherwise.
|
||||
Any.default_visualization self = Id.json
|
||||
Any.default_visualization self = Id.table
|
||||
|
||||
## PRIVATE
|
||||
Specifies that the builtin JSON visualization should be used for any JS_Objects
|
||||
JS_Object.default_visualization self = Id.json
|
||||
|
||||
## PRIVATE
|
||||
Returns a Text used to display this value in the IDE.
|
||||
|
@ -2027,7 +2027,7 @@ class RuntimeVisualizationsTest extends AnyFlatSpec with Matchers {
|
||||
data
|
||||
}
|
||||
|
||||
new String(data) shouldEqual "(Builtin 'JSON')"
|
||||
new String(data) shouldEqual "(Builtin 'Table')"
|
||||
|
||||
val loadedLibraries = attachVisualizationResponses
|
||||
.collect {
|
||||
|
@ -32,10 +32,13 @@ add_specs suite_builder = suite_builder.group "Serializable Visualization Identi
|
||||
v_1.to_json.should_equal (expected "enso_dev.Visualization_Tests" "My Vis")
|
||||
v_2.to_json.should_equal (expected "Standard.Base" "Other Vis")
|
||||
|
||||
group_builder.specify "specifies default JSON visualization for any type" <|
|
||||
My_Type.Value 30 . default_visualization . should_equal Visualization.Id.json
|
||||
"foobar".default_visualization.should_equal Visualization.Id.json
|
||||
True.default_visualization.should_equal Visualization.Id.json
|
||||
group_builder.specify "specifies default Table visualization for any type" <|
|
||||
My_Type.Value 30 . default_visualization . should_equal Visualization.Id.table
|
||||
"foobar".default_visualization.should_equal Visualization.Id.table
|
||||
True.default_visualization.should_equal Visualization.Id.table
|
||||
|
||||
group_builder.specify "specifies default json visualization JS_Object type" <|
|
||||
(Json.parse '{"name":"John","age":25,"email":"john@example.com"}') . default_visualization . should_equal Visualization.Id.json
|
||||
|
||||
group_builder.specify "specifies default Table visualization for Vector and Array type" <|
|
||||
[1,2,3].default_visualization.should_equal Visualization.Id.table
|
||||
|
Loading…
Reference in New Issue
Block a user