pg_rails 7.0.8.pre.alpha.101 → 7.0.8.pre.alpha.103
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/views/pg_engine/base/index.html.slim +1 -0
- data/pg_engine/spec/components/previews/alert_component_preview/tooltips.html.slim +1 -0
- data/pg_engine/spec/components/previews/alert_component_preview.rb +2 -0
- data/pg_engine/spec/system/tooltips_spec.rb +34 -0
- data/pg_layout/app/javascript/config/index.js +1 -0
- data/pg_layout/app/javascript/config/tooltips.js +13 -0
- data/pg_layout/app/views/pg_layout/_navbar.html.erb +1 -1
- data/pg_rails/lib/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adf3e1c08971d75321d41dd7af1e1e564429e53ff550f79ba17a9ad68414c5f9
|
4
|
+
data.tar.gz: 6b2795f204ae9f2cd47b7fec7d1899bc49fb9c07fd2b48eb616aebb7a10e93c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce8f1e2eda8c93f15128ea12fb6dbf334b8dd7a85e0e9e6286a4e18d19484176105ed975a5cd1f641db05c773d80a72130c9649abfe55e6b0bec736e1f760235
|
7
|
+
data.tar.gz: b8f789a849733993524a2a403b0782dbb77ec3e043b913ca9641fb707e99261a13ccaf5b42809b20be516dffccb21954ef9411638a6f49a19857d05977f6e432
|
@@ -53,6 +53,7 @@ div
|
|
53
53
|
- atributos_para_listar.each do |att|
|
54
54
|
td.text-nowrap = object.send(att)
|
55
55
|
td.text-nowrap.text-end.ps-5
|
56
|
+
= object.extra_actions(size: :sm) if object.respond_to? :extra_actions
|
56
57
|
= object.show_link
|
57
58
|
= object.edit_link(text: '', klass: 'btn-light')
|
58
59
|
= object.destroy_link
|
@@ -0,0 +1 @@
|
|
1
|
+
span#tooltip data-bs-toggle="tooltip" data-bs-title="El tooltip" las cosas
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
describe 'Tooltips' do
|
4
|
+
context 'en desktop' do
|
5
|
+
before do
|
6
|
+
# byebug
|
7
|
+
driven_by :selenium_chrome_headless
|
8
|
+
# Capybara.current_driver = :selenium_chrome
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'se activan con hover' do
|
12
|
+
visit '/rails/view_components/alert_component/tooltips'
|
13
|
+
expect(page).to have_no_text('tooltip')
|
14
|
+
find_by_id('tooltip').hover
|
15
|
+
expect(page).to have_text('tooltip')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'en mobile' do
|
20
|
+
before do
|
21
|
+
# driven_by :selenium_chrome_headless_iphone
|
22
|
+
driven_by :selenium_chrome_iphone
|
23
|
+
# driven_by :selenium_chrome_headless_notebook
|
24
|
+
# Capybara.current_driver = :selenium_chrome_headless_iphone
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'se activan con click' do
|
28
|
+
visit '/rails/view_components/alert_component/tooltips'
|
29
|
+
expect(page).to have_no_text('tooltip')
|
30
|
+
find_by_id('tooltip').click
|
31
|
+
expect(page).to have_text('tooltip')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as bootstrap from 'bootstrap'
|
2
|
+
|
3
|
+
document.addEventListener('turbo:load', bindTooltips)
|
4
|
+
document.addEventListener('turbo:render', bindTooltips)
|
5
|
+
|
6
|
+
function bindTooltips () {
|
7
|
+
const tooltipsQuery = '[data-bs-toggle="tooltip"]'
|
8
|
+
|
9
|
+
const toastElList = document.querySelectorAll(tooltipsQuery)
|
10
|
+
Array.from(toastElList).map(tooltipEl => {
|
11
|
+
return new bootstrap.Tooltip(tooltipEl)
|
12
|
+
})
|
13
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<nav class="navbar navbar-expand-<%= @breakpoint_navbar_expand %>" data-bs-theme="dark">
|
2
|
-
<div class="container-fluid">
|
2
|
+
<div class="container-fluid gap-2">
|
3
3
|
<% unless @sidebar == false %>
|
4
4
|
<button data-controller="navbar" data-action="navbar#expandNavbar"
|
5
5
|
class="btn btn-outline-light me-2 d-none d-<%= @breakpoint_navbar_expand %>-inline-block">
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.8.pre.alpha.
|
4
|
+
version: 7.0.8.pre.alpha.103
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1122,6 +1122,7 @@ files:
|
|
1122
1122
|
- pg_engine/spec/components/previews/alert_component_preview/colours.html.slim
|
1123
1123
|
- pg_engine/spec/components/previews/alert_component_preview/default.html.slim
|
1124
1124
|
- pg_engine/spec/components/previews/alert_component_preview/dismisible.html.slim
|
1125
|
+
- pg_engine/spec/components/previews/alert_component_preview/tooltips.html.slim
|
1125
1126
|
- pg_engine/spec/components/previews/internal_error_preview.rb
|
1126
1127
|
- pg_engine/spec/components/previews/internal_error_preview/default.html.slim
|
1127
1128
|
- pg_engine/spec/controllers/admin/accounts_controller_spec.rb
|
@@ -1166,6 +1167,7 @@ files:
|
|
1166
1167
|
- pg_engine/spec/system/noticed_spec.rb
|
1167
1168
|
- pg_engine/spec/system/send_mail_spec.rb
|
1168
1169
|
- pg_engine/spec/system/signup_spec.rb
|
1170
|
+
- pg_engine/spec/system/tooltips_spec.rb
|
1169
1171
|
- pg_layout/app/assets/stylesheets/animations.scss
|
1170
1172
|
- pg_layout/app/assets/stylesheets/sidebar.scss
|
1171
1173
|
- pg_layout/app/javascript/application.js
|
@@ -1175,6 +1177,7 @@ files:
|
|
1175
1177
|
- pg_layout/app/javascript/config/cable_ready.js
|
1176
1178
|
- pg_layout/app/javascript/config/index.js
|
1177
1179
|
- pg_layout/app/javascript/config/rollbar.js
|
1180
|
+
- pg_layout/app/javascript/config/tooltips.js
|
1178
1181
|
- pg_layout/app/javascript/config/turbo_rails/index.js
|
1179
1182
|
- pg_layout/app/javascript/config/turbo_rails/set_consumer.js
|
1180
1183
|
- pg_layout/app/javascript/controllers/application.js
|