Skip to content

Commit

Permalink
Update npm packages
Browse files Browse the repository at this point in the history
Update Lux to 5.5.1
Update old lux tags with new lux- tags
Remove the loading class as part of the event listener

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>
  • Loading branch information
christinach and sandbergja committed Aug 9, 2024
1 parent bcfbe9c commit c9e3666
Show file tree
Hide file tree
Showing 58 changed files with 2,505 additions and 1,743 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ gem 'honeybadger', '~> 4.0'

gem 'flipflop', '~> 2.7'

gem 'vite_rails', '~> 3.0'
gem 'vite_rails'

gem 'capistrano-yarn', '~> 2.0'
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
airbrussh (1.5.0)
sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.2)
Expand Down Expand Up @@ -129,7 +129,7 @@ GEM
warden (~> 1.2.3)
diff-lcs (1.5.0)
docile (1.4.0)
dry-cli (1.0.0)
dry-cli (1.1.0)
dumb_delegator (1.0.0)
ed25519 (1.3.0)
erubi (1.13.0)
Expand Down Expand Up @@ -164,10 +164,10 @@ GEM
net-smtp
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.0)
minitest (5.24.1)
msgpack (1.7.2)
net-imap (0.4.10)
date
Expand All @@ -183,14 +183,14 @@ GEM
net-protocol
net-ssh (7.2.0)
nio4r (2.7.0)
nokogiri (1.16.6)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.6-arm64-darwin)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-darwin)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
omniauth (2.1.2)
hashie (>= 3.4.6)
Expand All @@ -210,10 +210,10 @@ GEM
ast (~> 2.4.1)
racc
pg (1.5.4)
public_suffix (5.1.1)
public_suffix (6.0.1)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.0)
racc (1.8.1)
rack (2.2.9)
rack-protection (3.2.0)
base64 (>= 0.1.0)
Expand Down Expand Up @@ -255,7 +255,7 @@ GEM
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand Down Expand Up @@ -337,10 +337,10 @@ GEM
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
vite_rails (3.0.16)
vite_rails (3.0.17)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
vite_ruby (3.3.4)
vite_ruby (3.7.0)
dry-cli (>= 0.7, < 2)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
Expand All @@ -359,7 +359,7 @@ GEM
chronic (>= 0.6.3)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.13)
zeitwerk (2.6.17)

PLATFORMS
arm64-darwin-21
Expand Down Expand Up @@ -404,7 +404,7 @@ DEPENDENCIES
selenium-webdriver
simplecov
tzinfo-data
vite_rails (~> 3.0)
vite_rails
web-console (>= 3.3.0)
whenever

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*= require_self
*/

@import "../../../node_modules/lux-design-system/dist/system/system.utils.scss";
@import "lux-design-system/dist/style.scss";
@import "card";
@import "home_page";
@import "locker_applications";
29 changes: 16 additions & 13 deletions app/javascript/entrypoints/application.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import Vue from "vue/dist/vue.esm";
import system from "lux-design-system";
import "lux-design-system/dist/system/system.css";
import "lux-design-system/dist/system/tokens/tokens.scss";
// eslint-disable-next-line no-unused-vars
import { createApp } from "vue";
import lux from "lux-design-system";
import Rails from "@rails/ujs"; // we need to import Rails so vite adds it to the module
import CopyToClipboard from "../components/copy_to_clipboard";
import LockerSizeFilter from "../components/locker_size_filter";
import "lux-design-system/dist/style.scss";
import "lux-design-system/dist/style.css";

Vue.use(system);
const app = createApp({});
const createMyApp = () => createApp(app);

// create the LUX app and mount it to wrappers with class="lux"
document.addEventListener("DOMContentLoaded", () => {
document.getElementsByTagName("html")[0].classList.remove("loading");
var elements = document.getElementsByClassName("lux");
for (var i = 0; i < elements.length; i++) {
new Vue({
el: elements[i],
});
document.addEventListener('DOMContentLoaded', () => {
document.getElementsByTagName('html')[0].classList.remove("loading");
const elements = document.getElementsByClassName('lux')
for (let i = 0; i < elements.length; i++) {
createMyApp().use(lux)
.mount(elements[i]);
}
<<<<<<< HEAD
new CopyToClipboard();
new LockerSizeFilter();
});
=======
})
>>>>>>> 99c3e9b (Update npm packages)
18 changes: 9 additions & 9 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<wrapper>
<grid-container class="stretch-height" horizontal="center">
<grid-item vertical="center" columns="sm-8 lg-8">
<text-style variation="default">
<lux-wrapper>
<lux-grid-container class="stretch-height" horizontal="center">
<lux-grid-item vertical="center" columns="sm-8 lg-8">
<lux-text-style variation="default">
You must
<hyperlink href="<%= user_cas_omniauth_authorize_path %>" variation="button solid" data-method="post" size="large">Login with NetID</hyperlink>
<lux-hyperlink href="<%= user_cas_omniauth_authorize_path %>" variation="button solid" data-method="post" size="large">Login with NetID</lux-hyperlink>
to view the requested resource.
</text-style>
</grid-item>
</grid-container>
</wrapper>
</lux-text-style>
</lux-grid-item>
</lux-grid-container>
</lux-wrapper>
60 changes: 31 additions & 29 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,43 @@
</head>

<body>
<library-header app-name="Lockers and Study Rooms" abbr-name="Lockers" app-url="<%= root_path %>" class="lux" :max-width=1440 theme="dark">
<menu-bar type="main-menu" :menu-items="[
<% if current_user&.admin && current_user&.works_at_enabled_building? %>
<% if current_user&.building&.name === 'Firestone Library' %>
{name: 'Reporting', component: 'Reporting', children: [
{name: 'Locker Assignments by Department', component: 'Locker Assignments by Department', href: '/locker_assignments/assignment_report'},
{name: 'Locker Occupancy by Location', component: 'Locker Occupancy by Location', href: '/locker_assignments/occupancy_report'},
<header class="lux">
<lux-library-header app-name="Lockers and Study Rooms" abbr-name="Lockers" app-url="<%= root_path %>" :max-width=1440 theme="dark">
<lux-menu-bar type="main-menu" :menu-items="[
<% if current_user&.admin && current_user&.works_at_enabled_building? %>
<% if current_user&.building&.name === 'Firestone Library' %>
{name: 'Reporting', component: 'Reporting', children: [
{name: 'Locker Assignments by Department', component: 'Locker Assignments by Department', href: '/locker_assignments/assignment_report'},
{name: 'Locker Occupancy by Location', component: 'Locker Occupancy by Location', href: '/locker_assignments/occupancy_report'},
]},
<% end %>
{name: 'Locker Management', component: 'Locker Management', children: [
{name: 'Lockers', component: 'Lockers', href: '/lockers/'},
{name: 'Assign Lockers', component: 'Assing Lockers', href: '/locker_applications/awaiting_assignment'},
{name: 'All Applications', component: 'All Applications', href: '/locker_applications/'},
{name: 'Assignments', component: 'Assignments', href: '/locker_assignments/'},
{name: 'New Locker', component: 'New Locker', href: '/lockers/new'},
{name: 'Renewal Emails', component: 'Renewal Emails', href: '/locker_renewal_messages'},
]},
<% if current_user&.building&.name === 'Firestone Library' %>
{name: 'Study Room Management', component: 'Study Room Management', children: [
<% StudyRoom.general_areas.each do |area| %>
{name: 'Assign <%= area %>', component: 'Assign <%= area %>', href: '<%= assign_users_study_rooms_path(general_area: area) %>' },
<% end %>
{name: 'Study Rooms', component: 'Study Rooms', href: '/study_rooms/'},
{name: 'Assignments', component: 'Assignments', href: '/study_room_assignments/'},
]},
<% end %>
<% end %>
{name: 'Locker Management', component: 'Locker Management', children: [
{name: 'Lockers', component: 'Lockers', href: '/lockers/'},
{name: 'Assign Lockers', component: 'Assing Lockers', href: '/locker_applications/awaiting_assignment'},
{name: 'All Applications', component: 'All Applications', href: '/locker_applications/'},
{name: 'Assignments', component: 'Assignments', href: '/locker_assignments/'},
{name: 'New Locker', component: 'New Locker', href: '/lockers/new'},
{name: 'Renewal Emails', component: 'Renewal Emails', href: '/locker_renewal_messages'},
]},
<% if current_user&.building&.name === 'Firestone Library' %>
{name: 'Study Room Management', component: 'Study Room Management', children: [
<% StudyRoom.general_areas.each do |area| %>
{name: 'Assign <%= area %>', component: 'Assign <%= area %>', href: '<%= assign_users_study_rooms_path(general_area: area) %>' },
<% end %>
{name: 'Study Rooms', component: 'Study Rooms', href: '/study_rooms/'},
{name: 'Assignments', component: 'Assignments', href: '/study_room_assignments/'},
]},
<% end %>
<% end %>
{name: 'Logout', component: 'Logout', href: '/sign_out'},
]"></menu-bar>
</library-header>
{name: 'Logout', component: 'Logout', href: '/sign_out'},
]"></lux-menu-bar>
</lux-library-header>
</header>
<main class="lux">
<%= yield %>
</main>
<footer class="lux">
<library-footer></library-footer>
<lux-library-footer></lux-library-footer>
</footer>
</body>
</html>
18 changes: 9 additions & 9 deletions app/views/locker_applications/_building_select_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<wrapper>
<lux-wrapper>
<%= form_with(model: locker_application, local: true) do |form| %>
<%= form.hidden_field :user_uid , value: locker_application.uid %>
<grid-container horizontal="center" class="stretch-height">
<grid-item columns="lg-4 md-6 sm-12 auto" vertical="center" >
<lux-grid-container horizontal="center" class="stretch-height">
<lux-grid-item columns="lg-4 md-6 sm-12 auto" vertical="center" >
<div class="library-selection-box">
<input-select
<lux-input-select
label="Library"
name="locker_application[building_id]"
id="locker_application_building_id"
width="expand"
value=""
required
:options="<%= Building.building_choices.to_json %>"
></input-select>
<input-button type="submit" variation="solid">Next</input-button>
></lux-input-select>
<lux-input-button type="submit" variation="solid">Next</lux-input-button>
</div>
</grid-item>
</grid-container>
</lux-grid-item>
</lux-grid-container>
<% end %>
</wrapper>
</lux-wrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
<span id="duplicate-email-<%= partial_id %>" class="duplicate-email">
<%= duplicates.first.user.email%>
</span>
<input-button class="copy-to-clipboard" data-text-element="duplicate-email-<%= partial_id %>" aria-live="assertive" variation="solid" size="small">Copy</input-button>
<lux-input-button class="copy-to-clipboard" data-text-element="duplicate-email-<%= partial_id %>" aria-live="assertive" variation="solid" size="small">Copy</lux-input-button>
</div>
</details>
Loading

0 comments on commit c9e3666

Please sign in to comment.