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

[PR] Mobile Friendly Restyle #237

Merged
merged 85 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
77bce87
commit here before prettier test
solderq35 Aug 6, 2023
a207865
prettier seems to work
solderq35 Aug 6, 2023
94be646
better navbar rough draft and prettier setup finished
solderq35 Aug 6, 2023
483e04b
maybe fix mobile margin right issues
solderq35 Aug 7, 2023
81d9300
mobile detect pls
solderq35 Aug 7, 2023
19edd14
viewport pls
solderq35 Aug 7, 2023
0ada5a3
see if condensing mobile detect works
solderq35 Aug 7, 2023
5d36257
do we need screen in media query
solderq35 Aug 7, 2023
2a6788a
Merge branch 'master' into responsive-navbar-testing
solderq35 Aug 8, 2023
ed94965
run lint again on this branch
solderq35 Aug 8, 2023
20057dd
more mobile testing
solderq35 Aug 10, 2023
0b4c6ee
fix mobile mapcontainer css
solderq35 Aug 10, 2023
f960c2f
linter
solderq35 Aug 10, 2023
dd30d29
fix navbar and right position on mobile branch
solderq35 Aug 13, 2023
8023745
poc concept for event bus
solderq35 Aug 13, 2023
f48dc01
moved event bus components to separate components
solderq35 Aug 13, 2023
1dfde97
poc show or hide div on click
solderq35 Aug 13, 2023
f80ddc7
poc show and hide div complete?
solderq35 Aug 13, 2023
5667b00
set default true and remove old file
solderq35 Aug 13, 2023
4f32fe1
mobile test fr
solderq35 Aug 14, 2023
0365c83
mobile margins test + add sequential format script
solderq35 Aug 15, 2023
e26935b
see if this fixes vertical dimensions on mobile
solderq35 Aug 15, 2023
40d1fc5
is this stage height better
solderq35 Aug 15, 2023
24d3bc3
should fix margins fr?
solderq35 Aug 15, 2023
9b78f69
see if 100% height works
solderq35 Aug 15, 2023
7074dff
test mobile dimensions again
solderq35 Aug 15, 2023
f8b042d
styling better maybe for margins
solderq35 Aug 15, 2023
7cad2e9
fix margins again
solderq35 Aug 15, 2023
235b074
another margin test
solderq35 Aug 15, 2023
d75dd2a
fix open and close navbar on select
solderq35 Aug 15, 2023
3410bcd
make this dialogue smaller
solderq35 Aug 16, 2023
bf6ab06
fix show and hide menu buttons on mobile
solderq35 Aug 16, 2023
7fdcdf5
maybe fix margin issue
solderq35 Aug 17, 2023
579ef53
hide menu button popup again
solderq35 Aug 17, 2023
9121e0a
reset menu button higher
solderq35 Aug 17, 2023
19529e9
fix nav menu width mobile
solderq35 Aug 17, 2023
d62bfd1
update vue version
solderq35 Aug 17, 2023
3241984
hide map menu on mobile load
solderq35 Aug 17, 2023
720215e
roll back vue version
solderq35 Aug 17, 2023
4d0c587
test auto open local script + margin adjusts
solderq35 Aug 21, 2023
1a16d78
test landscope iphone
solderq35 Aug 21, 2023
caea6ee
landscape mode testing
solderq35 Aug 21, 2023
3f6a731
test side menu
solderq35 Aug 21, 2023
9a4796d
how wide is this
solderq35 Aug 21, 2023
faf46bb
forget about landscape for now
solderq35 Aug 21, 2023
cffd0f0
merge lastest from master into dev branch
solderq35 Aug 24, 2023
0ab97e5
Merge branch 'master' into responsive-navbar-testing
solderq35 Aug 24, 2023
108de73
try this viewport
solderq35 Sep 2, 2023
c0a073c
800
solderq35 Sep 2, 2023
7e8ac1c
how long can we go
solderq35 Sep 2, 2023
70f0ae3
Merge branch 'master' into responsive-navbar-testing
solderq35 Sep 2, 2023
7995a4d
Merge branch 'master' into responsive-navbar-testing
solderq35 Sep 2, 2023
79de64a
maybe better placement
solderq35 Sep 2, 2023
010968c
reduce popup width
solderq35 Sep 2, 2023
c234f94
see if bottom css does anything
solderq35 Sep 2, 2023
580e606
em height sidemenu
solderq35 Sep 2, 2023
c16d615
Merge branch 'master' into responsive-navbar-testing
solderq35 Sep 5, 2023
2463b6a
closed menu height
solderq35 Sep 5, 2023
f1d7d10
can I get away with existing navbar
solderq35 Sep 5, 2023
4f1333c
is this popup better on left
solderq35 Sep 5, 2023
d521db7
remove redundant code
solderq35 Sep 5, 2023
7136063
Merge branch 'master' into responsive-navbar-testing
solderq35 Sep 5, 2023
0017b27
maybe fix campaigns
solderq35 Sep 5, 2023
9ac4357
see if this height is better
solderq35 Sep 5, 2023
712d7cd
try 18 font
solderq35 Sep 5, 2023
ebcd2d5
try to adjust padding on campaigns
solderq35 Sep 5, 2023
2dd86f9
try to fix campaign date labels
solderq35 Sep 5, 2023
ddfd594
hopefully fix date padding
solderq35 Sep 5, 2023
97f541e
adjust building menu popup styling
solderq35 Sep 7, 2023
fbfb7dc
adjust font size
solderq35 Sep 7, 2023
f7dd9b7
fix iframes for mobile
solderq35 Sep 7, 2023
4995244
adjust reset map button width
solderq35 Sep 7, 2023
f94cd33
experimenting with font sizes
solderq35 Sep 7, 2023
a33ecc8
trying different popup sizes
solderq35 Sep 7, 2023
c3aa93c
change menu button left
solderq35 Sep 7, 2023
409b758
15px
solderq35 Sep 7, 2023
011f152
reset map button width
solderq35 Sep 7, 2023
b74a561
navbar highlighting
solderq35 Sep 7, 2023
f0ead5e
logo cursor pointer
solderq35 Sep 7, 2023
5482c7e
Merge branch 'master' into responsive-navbar-testing
solderq35 Sep 8, 2023
fc01a77
fix mobile contact page
solderq35 Sep 8, 2023
1e40a51
mobile friendly building list menu
solderq35 Sep 8, 2023
00874c0
fix reponsiveness for building label filters
solderq35 Sep 8, 2023
2b5cd22
change variables to something that makes more sense
solderq35 Sep 8, 2023
e0cdb7f
reset env dev
solderq35 Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions backend/tests/data_layer.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Filename: data_layer.spec.js
* Description: Unit tests for API endpoints associated with
* the data_layer (or data_store) VueX module
*/
* Filename: data_layer.spec.js
* Description: Unit tests for API endpoints associated with
* the data_layer (or data_store) VueX module
*/

// CORS testing utility requires
const testConfig = require('./assertedData/test_config.json')
Expand All @@ -17,11 +17,11 @@ const MOCK_REQUEST_EVENT = {
origin: `${client.scheme}://${client.host}`
},
queryStringParameters: {
'id': 9,
'point': 'accumulated_real',
'startDate': 1603854900,
'endDate': 1613618100,
'meterClass': 48
id: 9,
point: 'accumulated_real',
startDate: 1603854900,
endDate: 1613618100,
meterClass: 48
}
}

Expand Down Expand Up @@ -102,11 +102,10 @@ describe('Testing data_layer related API endpoints...', () => {
expect(jsonData['data'].length).toBe(2)
expect(jsonData['data'][0]['readings'].length).toBeGreaterThan(10)
expect(jsonData['data'][1]['readings'].length).toBeGreaterThan(10)

})

// TODO maybe: fix solar meter upload test below
/*
/*
const meter_id = 'M' + '007c9349-72ba-450c-aa1f-4e5a77b68f79'.replace(/-/g, 'M')
it('mock solar data upload...', async () => {
process.env.ACQUISUITE_PASS = 'test_pwd'
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=1028px,initial-scale=1.0" />
<meta name="viewport" content="width=600px,initial-scale=0" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-74257268-2"></script>
<script>
Expand Down
12 changes: 11 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
if ( !document.cookie.split( ';' ).some( cookieString => cookieString.includes( 'firstTimer' ) ) ) {
this.$msgbox( {
title: 'First Timer?',
message: 'Take a look at the "Get Started" tab to learn more and for FAQ\'s!',
message: 'Take a look at the "FAQ" tab for some info on how to get started!',
showCancelButton: true,
confirmButtonText: 'OK',
cancelButtonText: 'Never Show This Message Again',
Expand Down Expand Up @@ -90,6 +90,9 @@ export default {
font-weight: bold;
font-style: normal;
}
.el-message-box {
width: 350px !important;
}
body {
font-family: 'Open Sans', sans-serif;
-webkit-font-smoothing: antialiased;
Expand Down Expand Up @@ -139,6 +142,13 @@ body {
<style scoped lang="scss">
@import '@/assets/style-variables.scss';

/* Media query for mobile devices */
@media only screen and (max-width: 600px) {
body {
max-width: 100%;
overflow-x: hidden; /* Hide horizontal scrollbar */
}
}
.app {
padding: 0;
margin: 0;
Expand Down
10 changes: 10 additions & 0 deletions src/components/building_list/building_list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ export default {
font-size: 16px;
}

@media only screen and (max-width: 600px) {
.tab_label {
font-size: 14px;
}
/*-- for reducing el-tabs padding: https://www.jianshu.com/p/9db8679de026 --*/
::v-deep .el-tabs__item {
padding: 0 10px;
}
}

/*--- Flex Box ---*/
.card_flex {
flex-wrap: wrap !important;
Expand Down
6 changes: 6 additions & 0 deletions src/components/campaigns/campaign_building_list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,10 @@ $clippath: polygon(2.5% 0%, 0% 100%, 97.5% 100%, 100% 0%);
.innerTrophy.selected {
color: $--color-white;
}

@media only screen and (max-width: 600px) {
.buildingCol {
font-size: 18px;
}
}
</style>
4 changes: 2 additions & 2 deletions src/components/campaigns/campaign_list_block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</el-col>
</el-row>
<el-row class="popped">
<el-col :span="18" class="standings"> </el-col>
<el-col :span="6" class="dates"> {{ camp.dateStart | trunc }} - {{ camp.dateEnd | trunc }} </el-col>
<el-col :span="4" class="standings"> </el-col>
<el-col :span="20" class="dates"> {{ camp.dateStart | trunc }} - {{ camp.dateEnd | trunc }} </el-col>
</el-row>
</div>
</template>
Expand Down
28 changes: 25 additions & 3 deletions src/components/campaigns/main_campaign_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
<el-col :span="16" class="otherSide">
<div class="chartArea">
<el-row class="title">
<el-col :span="12">
<el-col :span="30">
{{ currentTitle }}
</el-col>
<el-col :span="12" class="timeSwitchButtons">
</el-row>
<el-row class="timeframe-labels">
<el-col :span="30" class="timeSwitchButtons">
<switchButtons
:blocks="blocks"
:campaign="true"
Expand Down Expand Up @@ -199,6 +201,14 @@ export default {
padding: 0;
}
.title {
font-size: 34px;
color: $--color-white;
font-family: 'StratumNo2';
text-align: left;
padding-left: 1em;
padding-bottom: 1em;
}
.timeframe-labels {
font-size: 34px;
color: $--color-white;
font-family: 'StratumNo2';
Expand Down Expand Up @@ -227,7 +237,7 @@ export default {
padding-right: 1em;
padding-bottom: 1em;
// min-height: calc(100vh - #{$--nav-height} - 200px);
height: calc(400px + 5em);
height: calc(450px + 5em);
}
.timeSwitchButtons {
text-align: right;
Expand All @@ -236,4 +246,16 @@ export default {
top: -0.5em;
font-size: 12px !important;
}

@media only screen and (max-width: 600px) {
.buildingContainer {
padding-right: 0em;
}
.otherSide {
padding-left: 0em;
}
.title {
padding-left: 2em;
}
}
</style>
12 changes: 11 additions & 1 deletion src/components/charts/chartController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
if ( this.$route.path.startsWith( '/map' ) ) {
return 'scaled-iframe'
} else {
return ''
return 'building-iframe'
}
},
promise: {
Expand Down Expand Up @@ -353,4 +353,14 @@ export default {
transform: scale(0.4);
transform-origin: top left;
}
.building-iframe {
height: 600px;
width: 1000px;
}
@media only screen and (max-width: 600px) {
.building-iframe {
height: 600px;
width: 600px;
}
}
</style>
5 changes: 5 additions & 0 deletions src/components/extras/contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ export default {
width: 50%;
padding: 10px;
}
@media only screen and (max-width: 600px) {
.center {
width: 80%;
}
}
</style>
51 changes: 51 additions & 0 deletions src/components/leftBuildingMenu.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<template>
<div>
<button @click="toggleFlag" class="toggleButton">{{ buttonText }}</button>
</div>
</template>

<script>
import { EventBus } from '../event-bus'

export default {
name: 'leftBuildingMenu',
data () {
return {
flag: true,
flag2: false
}
},
computed: {
isSmallScreen () {
return window.innerWidth < 844 // Adjust this threshold as needed
},
buttonText () {
return this.isSmallScreen
? this.flag2
? 'Hide Building Menu'
: 'Show Building Menu'
: this.flag
? 'Hide Building Menu'
: 'Show Building Menu'
}
},
methods: {
toggleFlag: function () {
if ( this.isSmallScreen ) {
this.flag2 = !this.flag2
EventBus.$emit( 'inputData', this.flag2 )
} else {
this.flag = !this.flag
EventBus.$emit( 'inputData', this.flag )
}
}
}
}
</script>

<style scoped lang="scss">
.toggleButton {
cursor: pointer;
font-size: 15px;
}
</style>
Loading
Loading