Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point group/select lead points#256 #277

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
3 changes: 2 additions & 1 deletion app/components/button.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// https://github.com/EnCiv/civil-pursuit/issues/43
//https://github.com/EnCiv/civil-pursuit/issues/257
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there weren't really changes to this file, so please revert it back to what's in master.

import React, { useState, useRef, useEffect } from 'react'
import { createUseStyles } from 'react-jss'
import { PositioningPortal } from '@codastic/react-positioning-portal'
Expand Down Expand Up @@ -139,7 +140,7 @@ const buttonStyles = createUseStyles(theme => ({
lineHeight: '1.5rem',
textAlign: 'center',
'&:focus': {
outline: `${theme.focusOutline}`,
outline: `${theme.focusOutline}`,
},
// Add any other common styles here
},
Expand Down
31 changes: 25 additions & 6 deletions app/components/point-group.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// https://github.com/EnCiv/civil-pursuit/issues/35
// https://github.com/EnCiv/civil-pursuit/issues/80
// https://github.com/EnCiv/civil-pursuit/issues/256

'use strict'

Expand Down Expand Up @@ -94,6 +95,9 @@ const PointGroup = props => {
point={pD}
vState={pD._id === selected ? 'selected' : 'default'}
className={cx(classes.selectPointsPassDown, classes.noBoxShadow)}
onClick={() => {
setSelected(pD._id)
}}
>
<div className={classes.invisibleElement}>
{/* this is here to take up space for the heigth calculation of every grid cell, but not be visible */}
Expand Down Expand Up @@ -123,6 +127,7 @@ const PointGroup = props => {
<div className={cx(classes.bottomButtons, classes.bottomButtonsOne)}>
<span>
<SecondaryButton
className={classes.secondaryButton}
disabled={selected === ''}
title="Done"
children="Done"
Expand Down Expand Up @@ -340,9 +345,6 @@ const useStylesFromThemeFunction = createUseStyles(theme => ({
borderStyle: {
borderRadius: '0.9375rem',
boxShadow: theme.boxShadow,
'&:hover': {
outline: `0.1875rem solid ${theme.colors.success}`,
},
'&:hover $defaultSubject': {
color: theme.colors.success,
},
Expand Down Expand Up @@ -388,7 +390,7 @@ const useStylesFromThemeFunction = createUseStyles(theme => ({
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
gap: '0.625rem',
gap: '1rem',
position: 'relative',
width: '100%',
boxSizing: 'border-box',
Expand Down Expand Up @@ -432,7 +434,17 @@ const useStylesFromThemeFunction = createUseStyles(theme => ({

bottomButtonsTwo: {},
bottomButtonsOne: {},
secondaryButton: {

width: '40%',

'&:disabled': {

opacity: '30%',

},

},
bottomButtons: {
boxSizing: 'border-box',
width: '100%',
Expand Down Expand Up @@ -484,6 +496,7 @@ const useStylesFromThemeFunction = createUseStyles(theme => ({

selectPointsPassDown: {
height: '100%',
paddingBottom: '0.683rem',
},

pointWidthButton: {
Expand All @@ -504,13 +517,20 @@ const useStylesFromThemeFunction = createUseStyles(theme => ({
},

selectSelectButton: {
width: '75%',
width: '85%',

'&:focus': {

outline: 'none',

},
},

selectedButton: {
backgroundColor: theme.colors.encivYellow,
'&:hover, &.hover': {
backgroundColor: theme.colors.encivYellow,
outline: 'none',
},
},

Expand All @@ -530,7 +550,6 @@ const useStylesFromThemeFunction = createUseStyles(theme => ({
},

noBoxShadow: {
boxShadow: 'none',
border: '1px solid rgba(217, 217, 217, 0.40)',
},
selectedSubject: {
Expand Down
3 changes: 2 additions & 1 deletion app/components/point.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// https://github.com/EnCiv/civil-pursuit/issues/76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since there are no changes to this file, please revert it to origin/master:
git checkout origin/master app/components/point.jsx
git add app/components/point.jsx

// https://github.com/EnCiv/civil-pursuit/issues/80
// https://github.com/EnCiv/civil-pursuit/issues/140
// https://github.com/EnCiv/civil-pursuit/issues/256

'use strict'
import React, { forwardRef, useState } from 'react'
Expand Down Expand Up @@ -85,7 +86,7 @@ const Point = forwardRef((props, ref) => {

const useStylesFromThemeFunction = createUseStyles(theme => ({
contentContainer: {
padding: '2.1875rem 1.875rem',
padding: '1rem 1.875rem 2.1875rem 1.875rem',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are changes to this padding from another issue being worked on - https://github.com/EnCiv/civil-pursuit/pull/276/files

And they are different. For now, lets say don't make changes to point.jsx and we'll let the other issue deal with it.

display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
Expand Down
8 changes: 5 additions & 3 deletions app/components/sign-up.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// https://github.com/EnCiv/civil-pursuit/issues/150
//https://github.com/EnCiv/civil-pursuit/issues/257
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file seems to be from a different branch for a different issue. Please revert this to what's in master

//https://github.com/EnCiv/civil-pursuit/issues/262

import React, { useState, useEffect } from 'react'
Expand Down Expand Up @@ -216,13 +217,13 @@ const useStyles = createUseStyles(theme => ({
},
tabs: {
width: '80%',
height: '3rem',
height: '2.8rem',
margin: 'auto',
borderRadius: '5rem',
border: '0.1rem solid',
borderColor: theme.colors.borderGray,
padding: '0.45rem 0.4rem 0 0.4rem ',
boxShadow: ' 0.3rem 0.3rem 1rem 0.3rem rgba(0, 0, 0, 0.1)',
padding: '0.28rem 0.4rem 0 0.4rem ',

},
tab: {
display: 'inline-block',
Expand Down Expand Up @@ -275,6 +276,7 @@ const useStyles = createUseStyles(theme => ({
'&:focus': {
border: `${theme.colors.focusOutline} solid 0.1rem`,
borderRadius: '3rem',
outline: 'none',
},
},
btnClickSelected: {
Expand Down