glimmer-dsl-opal 0.28.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/LICENSE.txt +1 -1
- data/README.md +175 -28
- data/VERSION +1 -1
- data/app/assets/images/glimmer/images/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/stylesheets/glimmer/jquery-ui.css +109 -106
- data/app/assets/stylesheets/glimmer/jquery-ui.structure.css +91 -91
- data/app/assets/stylesheets/glimmer/jquery-ui.theme.css +18 -15
- data/app/controllers/glimmer/image_paths_controller.rb +0 -1
- data/config/routes.rb +1 -1
- data/lib/display.rb +1 -1
- data/lib/glimmer/data_binding/table_items_binding.rb +1 -1
- data/lib/glimmer/dsl/opal/async_exec_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/bind_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/block_property_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/checkbox_group_selection_data_binding_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/color_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/custom_widget_expression.rb +3 -3
- data/lib/glimmer/dsl/opal/data_binding_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/dialog_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/display_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/dsl.rb +2 -0
- data/lib/glimmer/dsl/opal/exec_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/font_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/image_expression.rb +64 -0
- data/lib/glimmer/dsl/opal/menu_bar_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/menu_expression.rb +2 -2
- data/lib/glimmer/dsl/opal/message_box_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/property_expression.rb +2 -3
- data/lib/glimmer/dsl/opal/radio_group_selection_data_binding_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/rgb_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/rgba_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/shape_expression.rb +6 -4
- data/lib/glimmer/dsl/opal/shell_expression.rb +2 -2
- data/lib/glimmer/dsl/opal/shine_data_binding_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/swt_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/sync_exec_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/widget_expression.rb +1 -1
- data/lib/glimmer/engine.rb +1 -1
- data/lib/glimmer/swt/arrow_proxy.rb +7 -1
- data/lib/glimmer/swt/button_proxy.rb +4 -3
- data/lib/glimmer/swt/c_combo_proxy.rb +1 -1
- data/lib/glimmer/swt/c_tab_folder_proxy.rb +1 -1
- data/lib/glimmer/swt/c_tab_item_proxy.rb +1 -1
- data/lib/glimmer/swt/checkbox_proxy.rb +3 -2
- data/lib/glimmer/swt/color_proxy.rb +1 -1
- data/lib/glimmer/swt/composite_proxy.rb +1 -1
- data/lib/glimmer/swt/control_editor.rb +1 -1
- data/lib/glimmer/swt/custom/checkbox_group.rb +1 -1
- data/lib/glimmer/swt/custom/radio_group.rb +1 -1
- data/lib/glimmer/swt/custom/shape/arc.rb +75 -0
- data/lib/glimmer/swt/custom/shape/image.rb +98 -0
- data/lib/glimmer/swt/custom/shape/line.rb +4 -1
- data/lib/glimmer/swt/custom/shape/oval.rb +1 -1
- data/lib/glimmer/swt/custom/shape/point.rb +4 -1
- data/lib/glimmer/swt/custom/shape/polygon.rb +4 -1
- data/lib/glimmer/swt/custom/shape/polyline.rb +4 -1
- data/lib/glimmer/swt/custom/shape/rectangle.rb +53 -2
- data/lib/glimmer/swt/custom/shape/text.rb +52 -2
- data/lib/glimmer/swt/custom/shape.rb +101 -5
- data/lib/glimmer/swt/date_time_proxy.rb +2 -2
- data/lib/glimmer/swt/dialog_proxy.rb +1 -1
- data/lib/glimmer/swt/font_proxy.rb +1 -1
- data/lib/glimmer/swt/image_proxy.rb +29 -0
- data/lib/glimmer/swt/label_proxy.rb +1 -1
- data/lib/glimmer/swt/latest_dialog_proxy.rb +1 -1
- data/lib/glimmer/swt/latest_message_box_proxy.rb +1 -1
- data/lib/glimmer/swt/latest_shell_proxy.rb +4 -4
- data/lib/glimmer/swt/layout_proxy.rb +1 -1
- data/lib/glimmer/swt/make_shift_shell_proxy.rb +1 -1
- data/lib/glimmer/swt/menu_item_proxy.rb +3 -3
- data/lib/glimmer/swt/menu_proxy.rb +22 -16
- data/lib/glimmer/swt/message_box_proxy.rb +1 -1
- data/lib/glimmer/swt/progress_bar_proxy.rb +1 -1
- data/lib/glimmer/swt/scale_proxy.rb +7 -1
- data/lib/glimmer/swt/shell_proxy.rb +1 -1
- data/lib/glimmer/swt/slider_proxy.rb +6 -0
- data/lib/glimmer/swt/spinner_proxy.rb +4 -3
- data/lib/glimmer/swt/style_constantizable.rb +1 -1
- data/lib/glimmer/swt/swt_proxy.rb +1 -1
- data/lib/glimmer/swt/tab_folder_proxy.rb +1 -1
- data/lib/glimmer/swt/tab_item_proxy.rb +1 -1
- data/lib/glimmer/swt/table_editor.rb +1 -1
- data/lib/glimmer/swt/table_item_proxy.rb +3 -3
- data/lib/glimmer/swt/table_proxy.rb +1 -1
- data/lib/glimmer/swt/widget_proxy.rb +29 -28
- data/lib/glimmer/swt.rb +1 -1
- data/lib/glimmer/ui/custom_shell.rb +1 -5
- data/lib/glimmer/ui/custom_widget.rb +5 -5
- data/lib/glimmer/util/proc_tracker.rb +3 -3
- data/lib/glimmer-dsl-opal/ext/date.rb +8 -8
- data/lib/glimmer-dsl-opal/ext/file.rb +1 -1
- data/lib/glimmer-dsl-opal/ext/glimmer/dsl/engine.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/contact_manager/contact_repository.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/login.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/block.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/game.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/past_game.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/tetromino.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/block.rb +45 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/high_score_dialog.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/playfield.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/score_lane.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/tetris_menu_bar.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/tetris.rb +3 -3
- data/lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/user_profile.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/weather.rb +5 -4
- data/lib/glimmer-dsl-opal/samples/hello/hello_arrow.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_browser.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_button.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_c_combo.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_c_tab.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_canvas.rb +25 -2
- data/lib/glimmer-dsl-opal/samples/hello/hello_checkbox.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_checkbox_group.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_combo.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_composite.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_computed.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_cursor.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_custom_shell.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_custom_widget.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_date_time.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_dialog.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_group.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_label.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_layout.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_list_multi_selection.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_list_single_selection.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_menu_bar.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_message_box.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_pop_up_context_menu.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_print.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_progress_bar.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_radio.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_radio_group.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_scale.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_slider.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_spinner.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_tab.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_table.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_text.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_world.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/images/scaffold_app.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/AUTHORS.txt +35 -1
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/index.html +503 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.css +4 -4
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.js +3 -10
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.structure.min.css +2 -2
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.theme.min.css +2 -2
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/package.json +26 -26
- data/lib/glimmer-dsl-opal/vendor/jquery.js +10881 -2
- data/lib/glimmer-dsl-opal/vendor/two.min.js +24 -0
- data/lib/glimmer-dsl-opal.rb +2 -1
- data/lib/glimmer-dsl-swt.rb +1 -1
- data/lib/net/http.rb +1 -1
- data/lib/os.rb +1 -1
- metadata +16 -16
- data/app/assets/images/glimmer/images/ui-icons_222222_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74430682335a43e8c15f65ea995ccedee45acf85aad90e223e277b4077123067
|
4
|
+
data.tar.gz: 59b69a644fd137e9dfb11752e54e8de7724f90f1650cc5b852affaba99c6eb6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38367a8a42eb26f53765f61b2bd4ee3cec0bc5a70e1b0252fc52c12244aa350d00cf161be3025982760a05dea63e4517b6ccd1864fbe9893149b1a5bbd22e019
|
7
|
+
data.tar.gz: 976cdf2d3626d84aa94088c29981f7a283a908fddc8f83729e05298d30c71f411576b0e3e0fdf9a3491ce44e0cb1bd5fd24e81a4831a51b6a58443f94832df57
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.29.0
|
4
|
+
|
5
|
+
- Support Rails 7
|
6
|
+
- Upgrade to Opal 1.4.1
|
7
|
+
- Upgrade jQuery to 3.6.0
|
8
|
+
- Upgrade jQuery-UI to 1.13.1
|
9
|
+
- Fix Hello, Arrow! (menu is showing up outside of widget on the top left of the screen)
|
10
|
+
- Upgrade to Glimmer DSL for XML 1.3.1
|
11
|
+
- Upgrade to Glimmer DSL for CSS 1.2.1
|
12
|
+
|
13
|
+
## 0.28.3
|
14
|
+
|
15
|
+
- Support Canvas Shape DSL data-binding
|
16
|
+
- Use Canvas Shape DSL data-binding with Hello, Canvas! text string attribute
|
17
|
+
- Add bevel 3D look to Tetris elaborate sample via Canvas Shape DSL
|
18
|
+
- Ensure shell height compensates for providing extra top space to menu_bar when rendered
|
19
|
+
|
20
|
+
## 0.28.2
|
21
|
+
|
22
|
+
- Support `image` Canvas Shape DSL keyword
|
23
|
+
- Use `image` in Hello, Canvas! sample
|
24
|
+
|
25
|
+
## 0.28.1
|
26
|
+
|
27
|
+
- Support `arc` Canvas Shape DSL keyword (partial support whereby width is assumed to be equal to height to start from a circle basis)
|
28
|
+
- Use `arc` in Hello, Canvas! sample
|
29
|
+
|
3
30
|
## 0.28.0
|
4
31
|
|
5
32
|
- Initial support for Canvas Shape DSL keywords (no-databinding, nesting, or gradients yet):
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -143,15 +143,23 @@ Hello, Table! Game Booked
|
|
143
143
|
|
144
144
|
![Glimmer DSL for Opal Hello Table](images/glimmer-dsl-opal-hello-table-game-booked.png)
|
145
145
|
|
146
|
-
NOTE: Glimmer DSL for Opal is an alpha project. Please help make better by contributing, adopting for small or low risk projects, and providing feedback. It is still an early alpha, so the more feedback and issues you report the better.
|
147
|
-
|
148
|
-
**Alpha Version** 0.
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
-
|
146
|
+
NOTE: Glimmer DSL for Opal is an alpha project (only about 76% complete). If you want it developed faster, then [open an issue report](https://github.com/AndyObtiva/glimmer-dsl-opal/issues/new). I have completed some GitHub project features much faster before due to [issue reports](https://github.com/AndyObtiva/glimmer-dsl-opal/issues) and [pull requests](https://github.com/AndyObtiva/glimmer-dsl-opal/pulls). Please help make better by contributing, adopting for small or low risk projects, and providing feedback. It is still an early alpha, so the more feedback and issues you report the better.
|
147
|
+
|
148
|
+
**Alpha Version** 0.29.0 only supports bare-minimum capabilities for the included [samples](https://github.com/AndyObtiva/glimmer-dsl-opal#samples) (originally written for [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt)).
|
149
|
+
|
150
|
+
**[Glimmer](https://github.com/AndyObtiva/glimmer) DSL Comparison Table:**
|
151
|
+
DSL | Platforms | Native? | Vector Graphics? | Pros | Cons | Prereqs
|
152
|
+
----|-----------|---------|------------------|------|------|--------
|
153
|
+
[Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)](https://github.com/AndyObtiva/glimmer-dsl-swt) | Mac / Windows / Linux | Yes | Yes (Canvas Shape DSL) | Very Mature / Scaffolding / Native Executable Packaging / Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint | Java / JRuby
|
154
|
+
[Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)](https://github.com/AndyObtiva/glimmer-dsl-opal) | All Web Browsers | No | Yes (Canvas Shape DSL) | Simpler than All JavaScript Technologies / Auto-Webify Desktop Apps | Setup Process / Incomplete Alpha | Rails
|
155
|
+
[Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-libui) | Mac / Windows / Linux | Yes | Yes (Area API) | Very Simple Setup / Fast Startup Time / Light Memory Footprint | LibUI is an Incomplete Mid-Alpha Only | None Other Than MRI Ruby
|
156
|
+
[Glimmer DSL for Tk (MRI Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-tk) | Mac / Windows / Linux | Some Native-Themed Widgets (Not Truly Native) | Yes (Canvas) | Fast Startup Time / Light Memory Footprint | Widgets Do Not Look Truly Native, Espcially on Linux | ActiveTcl / MRI Ruby
|
157
|
+
[Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-gtk) | Mac / Windows / Linux | Only on Linux | Yes (Cairo) | Complete Access to GNOME Features on Linux | Not Native on Mac and Windows | None Other Than MRI Ruby on Linux / Brew Packages on Mac / MSYS & MING Toolchains on Windows / MRI Ruby
|
158
|
+
[Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-fx) | Mac (requires XQuartz) / Windows / Linux | No | Yes (Canvas) | No Prerequisites on Windows | Widgets Do Not Look Native / Mac Usage Obtrusively Starts XQuartz | None Other Than MRI Ruby on Windows / XQuarts on Mac / MRI Ruby
|
159
|
+
[Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-jfx) | Mac / Windows / Linux | No | Yes (javafx.scene.shape and javafx.scene.canvas) | Rich in Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint / Widgets Do Not Look Native | Java / JRuby / JavaFX SDK
|
160
|
+
[Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-swing) | Mac / Windows / Linux | No | Yes (Java2D) | Very Mature | Slow JRuby Startup Time / Heavy Memory Footprint / Widgets Do Not Look Native | Java / JRuby
|
161
|
+
[Glimmer DSL for XML (& HTML)](https://github.com/AndyObtiva/glimmer-dsl-xml) | All Web Browsers | No | Yes (SVG) | Programmable / Lighter-weight Than Actual XML | XML Elements Are Sometimes Not Well-Named (Many Types of Input) | None
|
162
|
+
[Glimmer DSL for CSS](https://github.com/AndyObtiva/glimmer-dsl-css) | All Web Browsers | No | Yes | Programmable | CSS Is Over-Engineered / Too Many Features To Learn | None
|
155
163
|
|
156
164
|
## Table of Contents
|
157
165
|
|
@@ -221,9 +229,10 @@ Please keep in mind this is a live list of innovative ideas, some of which have
|
|
221
229
|
|
222
230
|
- **Live purely in Rubyland via the Glimmer GUI DSL**, completely oblivious to web browser technologies, thanks to [Opal](https://opalrb.com/).
|
223
231
|
- **HTML is for creating documents not interactive applications**. As such, software engineers can avoid it and focus on creating web applications more productively with Glimmer DSL for Opal in pure Ruby instead (just like they do in desktop development) while content creators and web designers can be the ones responsible for creating HTML documents for web content purposes only as HTML was originally intended. That way, Glimmer web GUI is used and embedded in web pages when providing users with applications while the rest of the web pages are maintained by non-engineers as pure HTML. This achieves a correct separation of responsibilities and better productivity and maintainability.
|
224
|
-
- **Approximate styles by developers via the Glimmer GUI DSL. Perfect styles by designers via pure CSS**. Developers can simply build GUI with approximate styling similar to desktop GUI and mockups without worrying about pixel-perfect aesthetics. Web designers can take styling further with pure CSS since every HTML element auto-generated by Glimmer DSL for Opal has a predictable ID and CSS class. This achieves a proper separation of responsibilities between developers and designers.
|
232
|
+
- **Approximate styles by developers via the Glimmer GUI DSL. Perfect styles by designers via pure CSS**. Developers can simply build GUI with approximate styling similar to desktop GUI and mockups without worrying about pixel-perfect aesthetics. Web designers can take styling further with pure CSS since every HTML element auto-generated by [Glimmer DSL for Opal](https://rubygems.org/gems/glimmer-dsl-opal) (using [Glimmer DSL for XML & HTML](https://rubygems.org/gems/glimmer-dsl-xml)) has a predictable ID and CSS class. This achieves a proper separation of responsibilities between developers and designers.
|
225
233
|
- **Web servers are used just like servers in traditional client/server architecture**, meaning they simply provide RMI services to enable centralizing some of the application logic and data in the cloud to make available everywhere and enable data-sharing with others.
|
226
|
-
- **Forget Routers!** Glimmer DSL for Opal supports auto-routing of custom shells (windows), which are opened as separate tabs in a web browser with automatically generated routes and bookmarkable URLs.
|
234
|
+
- **Forget Routers!** [Glimmer DSL for Opal](https://rubygems.org/gems/glimmer-dsl-opal) supports auto-routing of custom shells (windows), which are opened as separate tabs in a web browser with automatically generated routes and bookmarkable URLs.
|
235
|
+
- **Images Are Local** Desktop apps typically display local images included in app files. When running a desktop app on the web, Glimmer DSL for Opal automatically copies application images to the assets directory and exposes them as download links. Desktop image Ruby code that uses `File.expand_path` or `File.join` automatically detects available image web URLs and matches them to corresponding desktop image paths behind the scenes, so desktop app images show up on the web without any extra effort! ([Hello, Table!](#hello-table-sample) and [Hello, Label!](#hello-label-sample) are good examples of that)
|
227
236
|
|
228
237
|
## Background
|
229
238
|
|
@@ -237,18 +246,130 @@ Alternatively, web developers may directly use [Glimmer DSL for Opal](https://ru
|
|
237
246
|
|
238
247
|
## Pre-requisites
|
239
248
|
|
240
|
-
- Rails 5
|
241
|
-
- Opal 1.0.5: [https://github.com/opal/opal](https://github.com/opal/opal)
|
242
|
-
- Opal-Rails 1.1.2: [https://github.com/opal/opal-rails](https://github.com/opal/opal-rails)
|
243
|
-
- jQuery 3: [https://code.jquery.com/](https://code.jquery.com/) (jQuery 3.5.1 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
244
|
-
- jQuery-UI 1.12: [https://code.jquery.com/](https://jqueryui.com/) (jQuery-UI 1.12.1 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
245
|
-
- jQuery-UI Timepicker 0.3: [https://code.jquery.com/](https://fgelinas.com/code/timepicker/) (jQuery-UI Timepicker 0.3.3 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
249
|
+
- Rails 5 or 7: [https://github.com/rails/rails/tree/5-2-stable](https://github.com/rails/rails/tree/5-2-stable)
|
250
|
+
- Opal 1.0.5 for Rails 5 or Opal 1.4.1 for Rails 7: [https://github.com/opal/opal](https://github.com/opal/opal)
|
251
|
+
- Opal-Rails 1.1.2 for Rails 5 or Opal-Rails 2.0.2 for Rails 7: [https://github.com/opal/opal-rails](https://github.com/opal/opal-rails)
|
252
|
+
- jQuery 3 (included): [https://code.jquery.com/](https://code.jquery.com/) (jQuery 3.5.1 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
253
|
+
- jQuery-UI 1.12 (included): [https://code.jquery.com/](https://jqueryui.com/) (jQuery-UI 1.12.1 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
254
|
+
- jQuery-UI Timepicker 0.3 (included): [https://code.jquery.com/](https://fgelinas.com/code/timepicker/) (jQuery-UI Timepicker 0.3.3 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
246
255
|
|
247
256
|
## Setup
|
248
257
|
|
249
258
|
(NOTE: Keep in mind this is a very early experimental and incomplete **alpha**. If you run into issues, try to go back to a [previous revision](https://rubygems.org/gems/glimmer-dsl-opal/versions). Also, there is a slight chance any issues you encounter are fixed in master or some other branch that you could check out instead)
|
250
259
|
|
251
|
-
The [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem is a Rails Engine gem that includes assets.
|
260
|
+
The [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem is a [Rails Engine](https://guides.rubyonrails.org/engines.html) gem that includes assets.
|
261
|
+
|
262
|
+
### Rails 7
|
263
|
+
|
264
|
+
Please follow the following steps to setup.
|
265
|
+
|
266
|
+
Install a Rails 7 gem:
|
267
|
+
|
268
|
+
```
|
269
|
+
gem install rails -v7.0.1
|
270
|
+
```
|
271
|
+
|
272
|
+
Start a new Rails 7 app:
|
273
|
+
|
274
|
+
```
|
275
|
+
rails new glimmer_app_server
|
276
|
+
```
|
277
|
+
|
278
|
+
Add the following to `Gemfile`:
|
279
|
+
|
280
|
+
```
|
281
|
+
gem 'opal', '1.4.1'
|
282
|
+
gem 'opal-rails', '2.0.2'
|
283
|
+
gem 'opal-async', '~> 1.4.0'
|
284
|
+
gem 'opal-jquery', '~> 0.4.6'
|
285
|
+
gem 'glimmer-dsl-opal', '~> 0.28.4'
|
286
|
+
gem 'glimmer-dsl-xml', '~> 1.3.1', require: false
|
287
|
+
gem 'glimmer-dsl-css', '~> 1.2.1', require: false
|
288
|
+
```
|
289
|
+
|
290
|
+
Follow [opal-rails](https://github.com/opal/opal-rails) instructions, basically running:
|
291
|
+
|
292
|
+
```
|
293
|
+
bin/rails g opal:install
|
294
|
+
```
|
295
|
+
|
296
|
+
Edit `config/initializers/assets.rb` and add the following at the bottom:
|
297
|
+
```
|
298
|
+
Opal.use_gem 'glimmer-dsl-opal'
|
299
|
+
```
|
300
|
+
|
301
|
+
Run:
|
302
|
+
|
303
|
+
```
|
304
|
+
rails g scaffold welcome
|
305
|
+
```
|
306
|
+
|
307
|
+
Run:
|
308
|
+
|
309
|
+
```
|
310
|
+
rails db:migrate
|
311
|
+
```
|
312
|
+
|
313
|
+
Add the following to `config/routes.rb` inside the `Rails.application.routes.draw` block:
|
314
|
+
|
315
|
+
```ruby
|
316
|
+
mount Glimmer::Engine => "/glimmer" # add on top
|
317
|
+
root to: 'welcomes#index'
|
318
|
+
```
|
319
|
+
|
320
|
+
Edit `app/views/layouts/application.html.erb` and add the following below other `stylesheet_link_tag` declarations:
|
321
|
+
|
322
|
+
```erb
|
323
|
+
<%= stylesheet_link_tag 'glimmer/glimmer', media: 'all', 'data-turbolinks-track': 'reload' %>
|
324
|
+
```
|
325
|
+
|
326
|
+
Clear the file `app/views/welcomes/index.html.erb` completely from all content.
|
327
|
+
|
328
|
+
Delete `app/javascript/application.js`
|
329
|
+
|
330
|
+
Edit and replace `app/assets/javascript/application.js.rb` content with code below (optionally including a require statement for one of the [samples](#samples) below):
|
331
|
+
|
332
|
+
```ruby
|
333
|
+
require 'glimmer-dsl-opal' # brings opal and other dependencies automatically
|
334
|
+
|
335
|
+
# Add more require-statements or Glimmer GUI DSL code
|
336
|
+
```
|
337
|
+
|
338
|
+
Example to confirm setup is working:
|
339
|
+
|
340
|
+
```ruby
|
341
|
+
require 'glimmer-dsl-opal'
|
342
|
+
|
343
|
+
include Glimmer
|
344
|
+
|
345
|
+
shell {
|
346
|
+
fill_layout
|
347
|
+
text 'Example to confirm setup is working'
|
348
|
+
|
349
|
+
label {
|
350
|
+
text "Welcome to Glimmer DSL for Opal!"
|
351
|
+
foreground :red
|
352
|
+
font height: 24
|
353
|
+
}
|
354
|
+
}.open
|
355
|
+
```
|
356
|
+
|
357
|
+
Start the Rails server:
|
358
|
+
```
|
359
|
+
rails s
|
360
|
+
```
|
361
|
+
|
362
|
+
Visit `http://localhost:3000`
|
363
|
+
|
364
|
+
You should see:
|
365
|
+
|
366
|
+
![setup is working](/images/glimmer-dsl-opal-setup-example-working.png)
|
367
|
+
|
368
|
+
If you run into any issues in setup, refer to the [Sample Glimmer DSL for Opal Rails](https://github.com/AndyObtiva/sample-glimmer-dsl-opal-rails-app) project (in case I forgot to include some setup steps by mistake). It is also hosted online (proving that it works): https://sample-glimmer-dsl-opal-app.herokuapp.com/
|
369
|
+
|
370
|
+
Otherwise, if you still cannot setup successfully (even with the help of the sample project, or if the sample project stops working), please do not hesitate to report an [Issue request](https://github.com/AndyObtiva/glimmer-dsl-opal/issues) or fix and submit a [Pull Request](https://github.com/AndyObtiva/glimmer-dsl-opal/pulls).
|
371
|
+
|
372
|
+
### Rails 5
|
252
373
|
|
253
374
|
Please follow the following steps to setup.
|
254
375
|
|
@@ -271,13 +392,12 @@ gem 'opal', '1.0.5'
|
|
271
392
|
gem 'opal-rails', '1.1.2'
|
272
393
|
gem 'opal-async', '~> 1.4.0'
|
273
394
|
gem 'opal-jquery', '~> 0.4.4'
|
274
|
-
gem 'glimmer-dsl-opal', '~> 0.
|
395
|
+
gem 'glimmer-dsl-opal', '~> 0.29.0'
|
275
396
|
gem 'glimmer-dsl-xml', '~> 1.2.0', require: false
|
276
397
|
gem 'glimmer-dsl-css', '~> 1.2.0', require: false
|
277
|
-
|
278
398
|
```
|
279
399
|
|
280
|
-
Follow
|
400
|
+
Follow [opal-rails](https://github.com/opal/opal-rails) instructions, basically the configuration of: `config/initializers/assets.rb`
|
281
401
|
|
282
402
|
Edit `config/initializers/assets.rb` and add the following at the bottom:
|
283
403
|
```
|
@@ -290,9 +410,16 @@ Run:
|
|
290
410
|
rails g scaffold welcome
|
291
411
|
```
|
292
412
|
|
293
|
-
|
413
|
+
Run:
|
414
|
+
|
415
|
+
```
|
416
|
+
rails db:migrate
|
417
|
+
```
|
418
|
+
|
419
|
+
Add the following to `config/routes.rb` inside the `Rails.application.routes.draw` block:
|
294
420
|
|
295
421
|
```ruby
|
422
|
+
mount Glimmer::Engine => "/glimmer" # add on top
|
296
423
|
root to: 'welcomes#index'
|
297
424
|
```
|
298
425
|
|
@@ -302,14 +429,16 @@ Edit `app/views/layouts/application.html.erb` and add the following below other
|
|
302
429
|
<%= stylesheet_link_tag 'glimmer/glimmer', media: 'all', 'data-turbolinks-track': 'reload' %>
|
303
430
|
```
|
304
431
|
|
305
|
-
Clear the file `app/views/welcomes/index.html.erb` from
|
432
|
+
Clear the file `app/views/welcomes/index.html.erb` completely from all content.
|
433
|
+
|
434
|
+
Delete `app/assets/javascripts/application.js`
|
306
435
|
|
307
|
-
|
436
|
+
Create an empty `app/assets/javascripts/application.rb`, and add Glimmer GUI DSL code or a require statement for one of the [samples](#samples) below.
|
308
437
|
|
309
438
|
```ruby
|
310
439
|
require 'glimmer-dsl-opal' # brings opal and other dependencies automatically
|
311
440
|
|
312
|
-
# require-
|
441
|
+
# Add more require-statements or Glimmer GUI DSL code
|
313
442
|
```
|
314
443
|
|
315
444
|
Example to confirm setup is working:
|
@@ -322,6 +451,7 @@ include Glimmer
|
|
322
451
|
shell {
|
323
452
|
fill_layout
|
324
453
|
text 'Example to confirm setup is working'
|
454
|
+
|
325
455
|
label {
|
326
456
|
text "Welcome to Glimmer DSL for Opal!"
|
327
457
|
foreground :red
|
@@ -330,6 +460,21 @@ shell {
|
|
330
460
|
}.open
|
331
461
|
```
|
332
462
|
|
463
|
+
Start the Rails server:
|
464
|
+
```
|
465
|
+
rails s
|
466
|
+
```
|
467
|
+
|
468
|
+
Visit `http://localhost:3000`
|
469
|
+
|
470
|
+
You should see:
|
471
|
+
|
472
|
+
![setup is working](/images/glimmer-dsl-opal-setup-example-working.png)
|
473
|
+
|
474
|
+
If you run into any issues in setup, refer to the [Sample Glimmer DSL for Opal Rails](https://github.com/AndyObtiva/sample-glimmer-dsl-opal-rails7-app) project (in case I forgot to include some setup steps by mistake).
|
475
|
+
|
476
|
+
Otherwise, if you still cannot setup successfully (even with the help of the sample project, or if the sample project stops working), please do not hesitate to report an [Issue request](https://github.com/AndyObtiva/glimmer-dsl-opal/issues) or fix and submit a [Pull Request](https://github.com/AndyObtiva/glimmer-dsl-opal/pulls).
|
477
|
+
|
333
478
|
## Supported Glimmer DSL Keywords
|
334
479
|
|
335
480
|
The following keywords from [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) have fully functional partial support in Opal:
|
@@ -1463,7 +1608,7 @@ You should see "Hello, Group!"
|
|
1463
1608
|
|
1464
1609
|
This is a minimal initial version of the [Hello, Canvas! sample included in Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_SAMPLES.md#hello-canvas).
|
1465
1610
|
|
1466
|
-
It supports all shapes
|
1611
|
+
It [supports](#supported-glimmer-dsl-keywords) all shapes and attribute data-binding, but no shape nesting or gradient support yet.
|
1467
1612
|
|
1468
1613
|
Add the following require statement to `app/assets/javascripts/application.rb`
|
1469
1614
|
|
@@ -2653,7 +2798,7 @@ Glimmer DSL for Opal Contact Manager Edit Done
|
|
2653
2798
|
|
2654
2799
|
#### Tetris
|
2655
2800
|
|
2656
|
-
This is a minimal
|
2801
|
+
This is a slightly minimal version of the [Tetris seen in Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_SAMPLES.md#glimmer-tetris).
|
2657
2802
|
|
2658
2803
|
Note that while the Glimmer GUI DSL code is mostly the same, some of the behavioral code around threads is changed
|
2659
2804
|
into async Opal code via the [opal-async](https://github.com/AndyObtiva/opal-async) gem due to the async nature of transpiled JavaScript.
|
@@ -2743,6 +2888,8 @@ You should see "User Profile"
|
|
2743
2888
|
|
2744
2889
|
#### Weather
|
2745
2890
|
|
2891
|
+
This sample does everything the desktop sample does except for the Canvas Shape DSL rectangle decoration (until supported).
|
2892
|
+
|
2746
2893
|
Code: [lib/glimmer-dsl-opal/samples/elaborate/weather](lib/glimmer-dsl-opal/samples/elaborate/weather.rb)
|
2747
2894
|
|
2748
2895
|
Add the following require statement to `app/assets/javascripts/application.rb`
|
@@ -2868,7 +3015,7 @@ These features have been suggested. You might see them in a future version of Gl
|
|
2868
3015
|
|
2869
3016
|
[MIT](https://opensource.org/licenses/MIT)
|
2870
3017
|
|
2871
|
-
Copyright (c) 2020-
|
3018
|
+
Copyright (c) 2020-2022 - Andy Maleh.
|
2872
3019
|
See [LICENSE.txt](LICENSE.txt) for further details.
|
2873
3020
|
|
2874
3021
|
--
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.29.0
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|