mensa 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/Dockerfile +6 -2
  3. data/.devcontainer/compose.yaml +1 -1
  4. data/.devcontainer/devcontainer.json +31 -29
  5. data/.devcontainer/postCreate.sh +8 -0
  6. data/.devcontainer/postStart.sh +9 -0
  7. data/.gitignore +3 -1
  8. data/.zed/tasks.json +12 -0
  9. data/CHANGELOG.md +6 -0
  10. data/Gemfile.lock +155 -153
  11. data/Procfile +1 -1
  12. data/README.md +95 -60
  13. data/app/assets/stylesheets/mensa/application.css +14 -11
  14. data/app/components/mensa/add_filter/component.css +110 -5
  15. data/app/components/mensa/add_filter/component.html.slim +10 -12
  16. data/app/components/mensa/add_filter/component.rb +8 -2
  17. data/app/components/mensa/add_filter/component_controller.js +697 -85
  18. data/app/components/mensa/cell/component.css +9 -0
  19. data/app/components/mensa/column_customizer/component.css +40 -0
  20. data/app/components/mensa/column_customizer/component.html.slim +14 -0
  21. data/app/components/mensa/column_customizer/component.rb +13 -0
  22. data/app/components/mensa/column_customizer/component_controller.js +383 -0
  23. data/app/components/mensa/control_bar/component.css +127 -4
  24. data/app/components/mensa/control_bar/component.html.slim +41 -14
  25. data/app/components/mensa/control_bar/component.rb +2 -6
  26. data/app/components/mensa/empty_state/component.css +20 -0
  27. data/app/components/mensa/empty_state/component.html.slim +7 -0
  28. data/app/components/mensa/empty_state/component.rb +18 -0
  29. data/app/components/mensa/filter_pill/component.css +23 -0
  30. data/app/components/mensa/filter_pill/component.html.slim +9 -0
  31. data/app/components/mensa/filter_pill/component.rb +24 -0
  32. data/app/components/mensa/filter_pill/component_controller.js +52 -0
  33. data/app/components/mensa/filter_pill_list/component.css +63 -0
  34. data/app/components/mensa/filter_pill_list/component.html.slim +11 -0
  35. data/app/components/mensa/{filter_list → filter_pill_list}/component.rb +1 -1
  36. data/app/components/mensa/filter_pill_list/component_controller.js +749 -0
  37. data/app/components/mensa/header/component.css +41 -43
  38. data/app/components/mensa/header/component.html.slim +7 -7
  39. data/app/components/mensa/header/component.rb +1 -1
  40. data/app/components/mensa/row_action/component.html.slim +2 -2
  41. data/app/components/mensa/row_action/component.rb +1 -1
  42. data/app/components/mensa/search/component.css +68 -9
  43. data/app/components/mensa/search/component.html.slim +19 -15
  44. data/app/components/mensa/search/component.rb +1 -1
  45. data/app/components/mensa/search/component_controller.js +39 -49
  46. data/app/components/mensa/selection/component_controller.js +147 -0
  47. data/app/components/mensa/table/component.css +28 -0
  48. data/app/components/mensa/table/component.html.slim +9 -6
  49. data/app/components/mensa/table/component.rb +1 -0
  50. data/app/components/mensa/table/component_controller.js +524 -76
  51. data/app/components/mensa/table_row/component.css +6 -0
  52. data/app/components/mensa/table_row/component.html.slim +8 -3
  53. data/app/components/mensa/table_row/component.rb +1 -1
  54. data/app/components/mensa/view/component.css +97 -29
  55. data/app/components/mensa/view/component.html.slim +23 -10
  56. data/app/components/mensa/view/component.rb +5 -0
  57. data/app/components/mensa/views/component.css +106 -13
  58. data/app/components/mensa/views/component.html.slim +51 -17
  59. data/app/components/mensa/views/component_controller.js +245 -20
  60. data/app/controllers/mensa/application_controller.rb +1 -1
  61. data/app/controllers/mensa/tables/batch_actions_controller.rb +24 -0
  62. data/app/controllers/mensa/tables/exports_controller.rb +96 -0
  63. data/app/controllers/mensa/tables/filters_controller.rb +6 -2
  64. data/app/controllers/mensa/tables/views_controller.rb +108 -0
  65. data/app/controllers/mensa/tables_controller.rb +5 -14
  66. data/app/helpers/mensa/application_helper.rb +4 -1
  67. data/app/javascript/mensa/application.js +2 -2
  68. data/app/javascript/mensa/controllers/application_controller.js +5 -21
  69. data/app/javascript/mensa/controllers/index.js +16 -7
  70. data/app/jobs/mensa/export_job.rb +77 -85
  71. data/app/models/mensa/export.rb +93 -0
  72. data/app/tables/mensa/action.rb +3 -1
  73. data/app/tables/mensa/base.rb +103 -17
  74. data/app/tables/mensa/batch_action.rb +27 -0
  75. data/app/tables/mensa/cell.rb +21 -6
  76. data/app/tables/mensa/column.rb +30 -25
  77. data/app/tables/mensa/config/action_dsl.rb +1 -1
  78. data/app/tables/mensa/config/batch_dsl.rb +13 -0
  79. data/app/tables/mensa/config/column_dsl.rb +1 -0
  80. data/app/tables/mensa/config/dsl_logic.rb +8 -4
  81. data/app/tables/mensa/config/filter_dsl.rb +4 -1
  82. data/app/tables/mensa/config/render_dsl.rb +1 -1
  83. data/app/tables/mensa/config/table_dsl.rb +14 -4
  84. data/app/tables/mensa/config/view_dsl.rb +2 -0
  85. data/app/tables/mensa/config_readers.rb +34 -3
  86. data/app/tables/mensa/filter.rb +94 -14
  87. data/app/tables/mensa/row.rb +1 -1
  88. data/app/tables/mensa/scope.rb +25 -13
  89. data/app/views/mensa/exports/_badge.html.slim +5 -0
  90. data/app/views/mensa/exports/_dialog.html.slim +42 -0
  91. data/app/views/mensa/exports/_list.html.slim +29 -0
  92. data/app/views/mensa/tables/filters/show.turbo_stream.slim +34 -6
  93. data/app/views/mensa/tables/show.html.slim +2 -0
  94. data/app/views/mensa/tables/show.turbo_stream.slim +1 -1
  95. data/app/views/mensa/tables/views/create.turbo_stream.slim +11 -0
  96. data/app/views/mensa/tables/views/destroy.turbo_stream.slim +11 -0
  97. data/app/views/mensa/tables/views/update.turbo_stream.slim +11 -0
  98. data/bin/setup +1 -1
  99. data/config/locales/en.yml +45 -1
  100. data/config/locales/nl.yml +46 -1
  101. data/config/routes.rb +7 -0
  102. data/db/migrate/20260604120000_create_mensa_exports.rb +25 -0
  103. data/docs/columns.png +0 -0
  104. data/docs/export.png +0 -0
  105. data/docs/filters.png +0 -0
  106. data/docs/table.png +0 -0
  107. data/lib/generators/mensa/tailwind_config_generator.rb +3 -3
  108. data/lib/generators/mensa/templates/config/initializers/mensa.rb +1 -1
  109. data/lib/mensa/configuration.rb +35 -15
  110. data/lib/mensa/engine.rb +15 -10
  111. data/lib/mensa/version.rb +1 -1
  112. data/lib/mensa.rb +2 -2
  113. data/lib/tasks/mensa_tasks.rake +1 -1
  114. data/mensa.gemspec +3 -2
  115. data/mise.toml +8 -0
  116. data/package-lock.json +0 -7
  117. metadata +60 -15
  118. data/app/components/mensa/filter/component_controller.js +0 -12
  119. data/app/components/mensa/filter_list/component.css +0 -14
  120. data/app/components/mensa/filter_list/component.html.slim +0 -14
  121. data/app/components/mensa/filter_list/component_controller.js +0 -14
  122. /data/{rubocop.yml → .rubocop.yml} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7b9a5dec3359255923794b7bdfd7b0cec906b52748b716da89607b808fac351
4
- data.tar.gz: 5551eb56bb39d24c96d266d3e18b5869066ea0128ae53f40818f579480b8f747
3
+ metadata.gz: 3b2c5a9217245753b104b14bc70f33f6f7594728422502a038cf065d3a476405
4
+ data.tar.gz: 899f8d8c2d5dc663cfef2e449b3ebee1201ee50af21058297a821327188b3ee6
5
5
  SHA512:
6
- metadata.gz: 44287cc7a421ce54a9a7ec8185fa5f73de4e16a69ce930cde7eb2fa72f6f13dc9f86d541851362752f3f45daf5872455775493129e18eef3c38ec5239feed169
7
- data.tar.gz: c7f03bdcdb3dbe0640e83097d7f6fca629fe69fa3ec65d6b8315f498fbe0e9fc5e633ef99a94d699fc223fc576c58fb8512dd6ac0684655a43b31b282e5353f9
6
+ metadata.gz: e17a9a703e1be7f84c7972beea41f0f2ec45801601afa65b30a3d17757e7c7c5bc94b4dbaf87a38692f65caf1ed3d3be08eb4d51167bd90ff5f2717bdfb9d339
7
+ data.tar.gz: 85cb357c58d4fdee8bb3e885856b6496ff6a04341c4472b3c7b455430482169b81864c437c944d203a6971e109c5f48ffc79393b4ab0d79ab8cdc3d6321ae76f
@@ -1,3 +1,7 @@
1
1
  # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
2
- ARG RUBY_VERSION=3.4.1
3
- FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
2
+ ARG RUBY_VERSION=3.4.7
3
+ FROM ghcr.io/rails/devcontainer/images/ruby:3.4.7
4
+
5
+ # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
6
+ # The value is a comma-separated list of allowed domains
7
+ ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev"
@@ -27,7 +27,7 @@ services:
27
27
  - RUBY_YJIT_ENABLE=1
28
28
 
29
29
  selenium:
30
- image: selenium/standalone-chromium
30
+ image: selenium/standalone-firefox
31
31
  restart: unless-stopped
32
32
 
33
33
  redis:
@@ -1,35 +1,37 @@
1
1
  // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
2
  // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
3
  {
4
- "name": "mensa",
5
- "dockerComposeFile": "compose.yaml",
6
- "service": "app",
7
- "workspaceFolder": "/workspaces/mensa",
8
- // Features to add to the dev container. More info: https://containers.dev/features.
9
- "features": {
10
- "ghcr.io/devcontainers/features/github-cli:1": { },
11
- "ghcr.io/rails/devcontainer/features/activestorage": { },
12
- "ghcr.io/rails/devcontainer/features/postgres-client": {
13
- "version": "17"
4
+ "name": "mensa",
5
+ "dockerComposeFile": "compose.yaml",
6
+ "service": "app",
7
+ "workspaceFolder": "/workspaces/mensa",
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ "features": {
10
+ "ghcr.io/devcontainers/features/github-cli:1": {},
11
+ "ghcr.io/rails/devcontainer/features/activestorage": {},
12
+ "ghcr.io/rails/devcontainer/features/postgres-client": {
13
+ "version": "17"
14
+ },
15
+ "ghcr.io/devcontainers/features/node:1": {},
16
+ "ghcr.io/duduribeiro/devcontainer-features/tmux:1": {}
14
17
  },
15
- "ghcr.io/devcontainers/features/node:1": { },
16
- "ghcr.io/duduribeiro/devcontainer-features/tmux:1": { }
17
- },
18
- "containerEnv": {
19
- "CAPYBARA_SERVER_PORT": "45678",
20
- "SELENIUM_HOST": "selenium",
21
- "DB_HOST": "postgres"
22
- },
23
- "forwardPorts": [
24
- 3000,
25
- 5432
26
- ],
27
- "customizations": {
28
- "vscode": {
29
- "extensions": [
30
- "Shopify.ruby-lsp"
31
- ]
18
+ "mounts": [
19
+ "source=/run/host-services/ssh-auth.sock,target=/ssh-agent,type=bind",
20
+ "source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached"
21
+ ],
22
+ "postCreateCommand": ".devcontainer/postCreate.sh",
23
+ "postStartCommand": ".devcontainer/postStart.sh",
24
+ "containerEnv": {
25
+ "CAPYBARA_SERVER_PORT": "45678",
26
+ "SELENIUM_URL": "http://host.docker.internal:4444/",
27
+ "VISUAL": "vi",
28
+ "DB_HOST": "postgres",
29
+ "SSH_AUTH_SOCK": "/ssh-agent"
30
+ },
31
+ "build": {
32
+ "args": {
33
+ "RUBY_VERSION": "3.4.7"
34
+ },
35
+ "dockerfile": "./devcontainer/Dockerfile"
32
36
  }
33
- },
34
- "postCreateCommand": "bin/setup"
35
37
  }
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+ MISE=$(which mise)
4
+
5
+ eval "$($MISE activate bash)"
6
+ $MISE trust
7
+ $MISE install
8
+ sudo chmod 666 /ssh-agent
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ MISE=$(which mise)
5
+ eval "$($MISE activate bash)"
6
+
7
+ npm install
8
+ bundle install
9
+ rake db:prepare
data/.gitignore CHANGED
@@ -19,4 +19,6 @@ app/assets/builds
19
19
  test/dummy/config/tailwind.config.js
20
20
  .envrc
21
21
 
22
- **/**/.DS_Store
22
+ **/**/.DS_Store
23
+ mise.toml
24
+ todo.md
data/.zed/tasks.json ADDED
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "label": "Rails server",
4
+ "command": "bin/rails server -p 3000 -b 0.0.0.0",
5
+ "tags": ["rails"]
6
+ },
7
+ {
8
+ "label": "CSS",
9
+ "command": "cd test/dummy && bin/rails tailwindcss:config && bin/rails tailwindcss:watch",
10
+ "tags": ["rails"]
11
+ }
12
+ ]
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## 0.2.4
4
+
5
+ - Renames the data column on table_views to config
6
+ - Adds descriptions to table view