Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Fix hound issues
Browse files Browse the repository at this point in the history
  • Loading branch information
WilHall committed Sep 22, 2019
1 parent 11dd59e commit e6c20fe
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
eslint:
enabled: true
config_file: assets/.eslintrc.json
ignore_file: assets/.eslintignore
version: 5.16.0
scss:
enabled: false
stylelint:
config_file: assets/.stylelintrc.json
ignore_file: assets/.stylelintignore
enabled: true
2 changes: 2 additions & 0 deletions assets/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
js/vendor
assets/js/vendor
1 change: 1 addition & 0 deletions assets/.stylelintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
css/vendor
assets/css/vendor
33 changes: 17 additions & 16 deletions assets/css/components/_announcement-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,33 @@
.recipients-preview {
position: relative;

.interested-user-count {
text-decoration: underline;

&:hover, &:focus {
color: $tbds-brand-red;

+ .interested-user-names {
visibility: visible;
opacity: 1;
}
}
}

.interested-user-names {
@include position(absolute, 24px null null null);
background-color: $white;
border: $base-border;
border-radius: $base-border-radius;
box-shadow: 0 0 16px rgba($light-gray, 0.6);
visibility: hidden;
opacity: 0;
display: block;
font-size: $small-font-size;
opacity: 0;
padding: $small-spacing;
width: 600px;
transition: opacity 150ms, visibility 150ms;
visibility: hidden;
width: 600px;
z-index: $ceiling-z-index;
}

.interested-user-count {
text-decoration: underline;

&:hover,
&:focus {
color: $tbds-brand-red;

+ .interested-user-names {
opacity: 1;
visibility: visible;
}
}
}
}
Empty file modified assets/css/vendor/_select2.css
100755 → 100644
Empty file.
10 changes: 5 additions & 5 deletions assets/js/announcement-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { markedWithSyntax } from './syntax-highlighting';
import { updateRecipientsPreview } from './recipients-preview';
import './vendor/select-woo';

$.fn.select2.amd.require(['select2/selection/search'], (Search) => {
$.fn.select2.amd.require([ 'select2/selection/search' ], (Search) => {
// Remove tag text when deleting a tag
// https://github.com/select2/select2/issues/3354#issuecomment-277419278
Search.prototype.searchRemoveChoice = function(decorated, item) {
this.trigger('unselect', {
data: item
data: item,
});

this.$search.val('');
Expand Down Expand Up @@ -89,10 +89,10 @@ export default class {
if (interests.length !== 0) {
interests.select2({
tags: true,
tokenSeparators: [',', ' '],
tokenSeparators: [ ',', ' ' ],
data: window.INTEREST_NAMES.map((interest) => {
return { "id": interest, "text": interest, "selected": window.SELECTED_INTEREST_NAMES.includes(interest) };
})
return { 'id': interest, 'text': interest, 'selected': window.SELECTED_INTEREST_NAMES.includes(interest) };
}),
}).on('change.select2', (_event) => {
const value = interests.select2('data').map((item) => item.id);

Expand Down
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config :constable, Constable.Repo,
adapter: Ecto.Adapters.Postgres,
database: "constable_api_test",
hostname: "localhost",
# username: System.get_env("POSTGRES_USER") || "postgres",
username: System.get_env("POSTGRES_USER") || "postgres",
pool: Ecto.Adapters.SQL.Sandbox

config :constable, :sql_sandbox, true
Expand Down

0 comments on commit e6c20fe

Please sign in to comment.