Skip to content

Commit 002bb14

Browse files
cbaudouinjrpeterkosJeremyRudmandependabot[bot]
authored
feat: Updates HackathonManager to 2.1
* Fixed issue on desktop * Map overflow scroll Signed-off-by: Peter Kos <pkos91@icloud.com> * Fix scroll issue Signed-off-by: Peter Kos <pkos91@icloud.com> * Fixed toggle button; fits screen, sidebar width Sidebar width is better Toggle button fills height of navbar Signed-off-by: Peter Kos <pkos91@icloud.com> * fix: Allows optional assets to be unset * Fixes test * feat: Redesigns OAuth2 portal (#404) * feat: Redesigns OAuth2 portal * fix: Some Hound issues * Changes application verbiage * Fixes ID issue * Fixes table link and sign out button * Peter's wishes * fix: Fixes MyMLH branding in config (#412) * feat(settings): Simplifies Config (#409) * feat(settings): Simplifies Config * Resolves Hound issues * Update app/views/manage/configs/index.html.haml Co-authored-by: Peter Kos <pkos91@icloud.com> * design: Increases the font-weight and reorganizes the page * fix: Hound issues Co-authored-by: Peter Kos <pkos91@icloud.com> * feat: Adds support for digital-only hackathons (#395) * feat: Adds support for digital-only hackathons * fix: Provides clarity for what is removed from digital hackathons Co-authored-by: Peter Kos <pkos91@icloud.com> * feat: Adds GitHub Action for releases (#426) * feat: Adds GitHub Action CI testing (#423) * feat: Adds GitHub Action CI testing * fix: Adds sudo * refactor: Changes naming * Removes travis.yml * docs: Adds ruby version comment * feat: Adds Legal Agreements object for dynamic agreements (#429) * feat: Adds Legal Agreements object for dynamic agreements * fix: Fixes several bugs with agreement error checking * fix: Fixes several Hound issues * fix: Fixes some more Hound issues * Update app/views/application/_unaccepted_agreements_notice.html.haml Co-authored-by: Peter Kos <pkos91@icloud.com> * fix: Fixes Peter's requests * Fix agreement checkbox wrap with small names Signed-off-by: Peter Kos <pkos91@icloud.com> * Fix straggling merge conflict error Signed-off-by: Peter Kos <pkos91@icloud.com> * Removed agreements card Signed-off-by: Peter Kos <pkos91@icloud.com> * Force validation for agreement on questionnaire pg FRONTEND Signed-off-by: Peter Kos <pkos91@icloud.com> Co-authored-by: Peter Kos <pkos91@icloud.com> * refactor: Changes hackathon_manager to HackathonManager (#417) Co-authored-by: Peter Kos <pkos91@icloud.com> * feat: Adds GitLab VCS URL support (#415) * feat: Adds GitLab VCS URL support * fix: Corrects Bitbucket capitalization * Update schema.rb Removes events * Update test/models/questionnaire_test.rb Co-authored-by: Peter Kos <pkos91@icloud.com> * Update test/models/questionnaire_test.rb Co-authored-by: Peter Kos <pkos91@icloud.com> Co-authored-by: Peter Kos <pkos91@icloud.com> * fix: Fixes pluralization of "Callback URL" (#421) * fix: Fixes pluralization of "Callback URL" * refactor: Adds "(s)" to Callback URLs Co-authored-by: Peter Kos <pkos91@icloud.com> * refactor: Removes legal section from config (#440) * refactor: Removes legal section from config * refactor: Removes agreement asset from locals * Removes additional PDF asset messages Co-authored-by: Peter Kos <pkos91@icloud.com> * fix(map): changed map overflow from scroll to auto (#428) changed the map div from overflow scroll to overflow auto so that the scroll bars do not show up when the map is large enough to not need them Co-authored-by: Peter Kos <pkos91@icloud.com> * build(deps-dev): Bump semantic-release from 17.2.1 to 17.2.3 (#435) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 17.2.1 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v17.2.1...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Peter Kos <pkos91@icloud.com> Co-authored-by: Peter Kos <pkos91@icloud.com> Co-authored-by: JeremyRudman <38338616+JeremyRudman@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent e209a68 commit 002bb14

File tree

70 files changed

+1157
-433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1157
-433
lines changed

.github/workflows/build.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Build - 2.6, 2.5
9+
10+
on:
11+
pull_request:
12+
branches: [ master, "2.1" ]
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
ruby-version: [2.6.6, 2.5.8]
20+
env:
21+
DATABASE_URL: mysql2://root@127.0.0.1:3800/myapp_test
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Start MySQL
25+
uses: cbaudouinjr/mysql-action@v1.9
26+
with:
27+
host port: 3800
28+
container port: 3800
29+
mysql timezone: America/New_York
30+
mysql version: '5.7'
31+
mysql database: 'myapp_test'
32+
- name: Update and install packages
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y libtool
36+
sudo apt-get install -y libyaml-dev
37+
sudo apt-get install -y build-essential
38+
sudo apt-get install -y libxslt-dev
39+
sudo apt-get install -y libxml2-dev
40+
sudo apt-get install -y default-libmysqlclient-dev
41+
sudo apt-get install -y default-mysql-client
42+
- name: Set up Ruby
43+
env:
44+
ImageOS: ubuntu18
45+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
46+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
47+
# uses: ruby/setup-ruby@v1
48+
# This version tag came with the Ruby build script built by GitHub. @v1 does not work.
49+
uses: ruby/setup-ruby@21351ecc0a7c196081abca5dc55b08f085efe09a
50+
with:
51+
ruby-version: ${{ matrix.ruby-version }}
52+
- name: Install gems
53+
run: |
54+
gem install pkg-config
55+
bundle config build.nokogiri --use-system-libraries
56+
bundle install
57+
- name: Run migrations
58+
run: |
59+
bin/rails db:migrate
60+
- name: Run tests
61+
run: bundle exec rake

.github/workflows/release.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Publish New Release
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
10+
jobs:
11+
publish:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: '14.x'
21+
- run: yarn install
22+
- run: yarn semantic-release

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@
3838

3939
# macOS
4040
.DS_Store
41+
42+
# Redis
43+
dump.rdb

.travis.yml

-51
This file was deleted.

app/assets/stylesheets/forms/_forms.sass

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ $form-spacing-horizontal: 9px
1818
.section-title
1919
margin: 12px 0 5px
2020

21+
#disclaimer.alert
22+
border: 2px solid var(--alert--border)
23+
2124
fieldset
2225
margin: 25px 0 0
2326
border: 1px solid #aaa
@@ -91,6 +94,10 @@ hr
9194
margin-left: -1 * $form-spacing-horizontal
9295
margin-right: -1 * $form-spacing-horizontal
9396

97+
.actions
98+
display: flex
99+
justify-content: flex-end
100+
94101
.input
95102
flex: 1 1 600px
96103
display: flex

app/assets/stylesheets/general/_header.sass

+8
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,19 @@ $account-nav-padding-vert: 15px
2323
.header-nav
2424
display: flex
2525
align-items: center
26+
width: 100%
2627
.button
2728
margin-right: 10px
2829
&:last-child
2930
margin-right: 0
3031

32+
.header-nav.start
33+
justify-content: flex-start
34+
flex-shrink: 2
35+
36+
.header-nav.end
37+
justify-content: flex-end
38+
3139
.account-nav
3240
@include css4
3341
border-bottom: 1px solid var(--account-nav--border-color)

app/assets/stylesheets/manage.sass

+7-45
Original file line numberDiff line numberDiff line change
@@ -31,47 +31,6 @@ $grey-med: #999
3131
.CodeMirror
3232
font-size: 12px
3333

34-
// .manage
35-
// padding-left: 20px
36-
// padding-right: 20px
37-
// padding-top: 50px
38-
39-
// .container-half, .container-full
40-
// max-width: none
41-
// @media (max-width: 600px)
42-
// padding-left: 0
43-
// padding-right: 0
44-
// .container-half
45-
// display: inline-block
46-
// width: 49.6% // weird issue with percentaces
47-
// vertical-align: top
48-
// @media (max-width: 600px)
49-
// width: 100%
50-
// .container-full
51-
// display: inline-block
52-
// width: 100%
53-
// vertical-align: top
54-
// margin: 0
55-
56-
// #manageNav
57-
// z-index: 1
58-
// width: 100%
59-
// background: $black
60-
// color: $white
61-
// padding: 16px 20px 6px
62-
// p, a
63-
// margin: 0 5px 10px
64-
// p
65-
// color: $primary
66-
// display: inline-block
67-
// margin-top: 0
68-
// &:first-child
69-
// margin-right: 10px
70-
// a
71-
// color: $white
72-
// display: inline-block
73-
// &:hover
74-
// color: darken($grey-light, 5%)
7534
.center
7635
text-align: center
7736

@@ -96,6 +55,8 @@ $grey-med: #999
9655

9756
#map
9857
text-align: center
58+
overflow: auto
59+
width: 100%
9960

10061
.dashboard-container-title
10162
border-bottom: 3px solid #e5e5e5
@@ -164,16 +125,17 @@ $grey-med: #999
164125
display: inherit
165126

166127
.navbar-mobile-toggle--active
167-
color: black !important
168-
background: #eee
128+
background: #eeeeee
129+
.fa
130+
color: black !important
169131

170132
.sidebar-mobile
171133
display: block !important
172134
bottom: auto
173135

174-
175136
.sidebar-mobile .sidebar-sticky
176-
height: auto
137+
height: calc(100vh - 2.25rem)
138+
overflow: scroll
177139

178140

179141
/*

app/assets/stylesheets/manage/dashboard.css

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
body {
2-
font-size: 0.875rem;
3-
}
41

52
/*
63
* Sidebar
@@ -12,14 +9,14 @@ body {
129
bottom: 0;
1310
left: 0;
1411
z-index: 5; /* Behind the navbar */
15-
padding: 48px 0 0; /* Height of navbar */
12+
padding: 2.25rem 0 0; /* Height of navbar */
1613
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
1714
}
1815

1916
.sidebar-sticky {
2017
position: relative;
2118
top: 0;
22-
height: calc(100vh - 48px);
19+
height: calc(100vh - 2.25rem);
2320
padding-top: 0.5rem;
2421
overflow-x: hidden;
2522
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
@@ -83,11 +80,11 @@ body {
8380
.navbar-brand {
8481
padding-top: 0.75rem;
8582
padding-bottom: 0.75rem;
83+
text-overflow: ellipsis;
84+
overflow: hidden;
8685
font-size: 1rem;
8786
background-color: rgba(0, 0, 0, 0.25);
8887
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
89-
text-overflow: ellipsis;
90-
overflow: hidden;
9188
}
9289

9390
.navbar .form-control {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
class Manage::AgreementsController < Manage::ApplicationController
2+
before_action :require_director
3+
before_action :set_agreement, only: [:show, :edit, :update, :destroy]
4+
5+
respond_to :html, :json
6+
7+
# GET /agreements
8+
def index
9+
@agreements = Agreement.all
10+
end
11+
12+
# GET /agreements/new
13+
def new
14+
@agreement = Agreement.new
15+
end
16+
17+
# GET /agreements/1/edit
18+
def edit
19+
end
20+
21+
# POST /agreements
22+
def create
23+
if !agreement_params['agreement_url'].start_with?('http://', 'https://')
24+
flash[:alert] = "Agreement URL must start with http:// or https://"
25+
redirect_to new_manage_agreement_path
26+
else
27+
@agreement = Agreement.new(agreement_params)
28+
@agreement.save
29+
flash[:notice] = "#{@agreement.name} was successfully created."
30+
redirect_to manage_agreements_path
31+
end
32+
end
33+
34+
# PATCH/PUT /agreements/1
35+
def update
36+
if !agreement_params['agreement_url'].nil? && !agreement_params['agreement_url'].start_with?('http://', 'https://')
37+
flash[:alert] = "Agreement URL must start with http:// or https://"
38+
redirect_to edit_manage_agreement_url
39+
else
40+
@agreement.update_attributes(agreement_params)
41+
flash[:notice] = nil
42+
redirect_to manage_agreements_path
43+
end
44+
end
45+
46+
# DELETE /agreements/1
47+
def destroy
48+
@agreement.destroy
49+
flash[:notice] = 'Agreement was successfully destroyed.'
50+
respond_with(:manage, @agreement, location: manage_agreements_path)
51+
end
52+
53+
private
54+
55+
# Use callbacks to share common setup or constraints between actions.
56+
def set_agreement
57+
@agreement = Agreement.find(params[:id])
58+
end
59+
60+
# Only allow a trusted parameter "white list" through.
61+
def agreement_params
62+
params.require(:agreement).permit(
63+
:name, :agreement_url
64+
)
65+
end
66+
end

app/controllers/manage/checkins_controller.rb

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def datatable
1212
end
1313

1414
def show
15+
@agreements = Agreement.all
1516
respond_with(:manage, @questionnaire)
1617
end
1718

app/controllers/manage/configs_controller.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ class Manage::ConfigsController < Manage::ApplicationController
66

77
def index
88
@config = HackathonConfig.get_all
9+
@basics = ['name', 'event_start_date', 'digital_hackathon'].freeze
10+
@questionnaire_settings = ['accepting_questionnaires', 'last_day_to_apply', 'auto_late_waitlist', 'disabled_fields'].freeze
11+
@styling = ['default_page_title', 'homepage_url', 'logo_asset', 'email_banner_asset', 'favicon_asset', 'custom_css'].freeze
12+
@communications = ['email_from', 'disclaimer_message', 'thanks_for_applying_message', 'thanks_for_rsvp_message', 'questionnaires_closed_message', 'bus_captain_notes']
913
respond_with(HackathonConfig.get_all)
1014
end
1115

@@ -17,7 +21,7 @@ def update
1721
value = params[:hackathon_config][key]
1822
value = true if value == "true"
1923
value = false if value == "false"
20-
if @config.var.end_with?("_asset") && !value.start_with?('http://', 'https://')
24+
if @config.var.start_with?("agreement_") && !value.start_with?('http://', 'https://')
2125
flash[:alert] = "Config \"#{key}\" must start with http:// or https://"
2226
render :edit
2327
elsif @config.value != value

0 commit comments

Comments
 (0)