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

Merging feature enhancements to master for prod release #1201

Merged
merged 67 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
e1c32ab
Added icons with links
dhochbaum-dcp Mar 11, 2024
e4da6a8
Added Toggle All Map Layers Off button to bottom of sidebar
dhochbaum-dcp Mar 12, 2024
6007b44
Added analytics to track toggle all off clicks
dhochbaum-dcp Mar 12, 2024
b7f2087
Multiple lot display set up, need map selection ability
dhochbaum-dcp Mar 14, 2024
ea103fe
Selecting multiple areas reflects correctly on the map sometimes
dhochbaum-dcp Mar 14, 2024
8757d6e
Moved button to top
dhochbaum-dcp Mar 15, 2024
a08b1a8
Improvements to map selection
dhochbaum-dcp Mar 15, 2024
ff2d211
Cancelling removes the correct selection
dhochbaum-dcp Mar 15, 2024
a0b6b19
Search works with comparison
dhochbaum-dcp Mar 15, 2024
981a7bc
Comparison items are of equal width
dhochbaum-dcp Mar 15, 2024
51caee9
Updated @nycplanning/ember to use branch with zola search history fun…
dhochbaum-dcp Mar 20, 2024
c815ebc
Adding, loading, and saving all work
dhochbaum-dcp Mar 21, 2024
c58371c
Updating the name works
dhochbaum-dcp Mar 21, 2024
b47ce42
Updates the dom correctly
dhochbaum-dcp Mar 22, 2024
6ba0dc8
Added analytics
dhochbaum-dcp Mar 22, 2024
086f0dc
Updated no bookmarks message and formatted input
dhochbaum-dcp Mar 22, 2024
03cc093
Updated view for no saved layer sets
dhochbaum-dcp Mar 22, 2024
5b52a31
Removed reset button, added undo toggle functionality
dhochbaum-dcp Mar 26, 2024
c2d9cbf
Added vertical line and some spacing to visually separate the two lot…
dhochbaum-dcp Mar 27, 2024
95a4678
Made comparison button more noticable
dhochbaum-dcp Mar 27, 2024
b91f04f
Added button to minimize and expand left side menu
dhochbaum-dcp Mar 28, 2024
daf2a7b
Changed icon for re-implementing layers to undo
dhochbaum-dcp Mar 28, 2024
680ba61
Added analytics, removed console.log
dhochbaum-dcp Apr 2, 2024
c6d862f
Drawing now retains previously drawn lines/areas
dhochbaum-dcp Apr 3, 2024
044b6d1
Added basic update modal with slideshow functionality
dhochbaum-dcp Apr 4, 2024
02be24d
Fixed button hide on mobile
dhochbaum-dcp Apr 8, 2024
b38d61b
Removed button to remove lot from comparison when only one lot is sel…
dhochbaum-dcp Apr 8, 2024
8454336
Removed delay hiding tooltip, added icon spacing and wrapping
dhochbaum-dcp Apr 8, 2024
96410d2
Removed cyclomedia button from bottom of tax lot page, as it is now l…
dhochbaum-dcp Apr 8, 2024
b7e8b62
# of bookmarks in menu badge now includes saved layer sets
dhochbaum-dcp Apr 8, 2024
aa0f422
Updated to turn on Search History fucntionality
dhochbaum-dcp Apr 9, 2024
94cc054
Loading bookmarks updates URL, number updates correctly, fixed tracki…
dhochbaum-dcp Apr 10, 2024
9687e64
Update default selected aerial layer
bmarchena Apr 11, 2024
fa2ab72
Changed link order, re-implemented hide delay for hover messages that…
dhochbaum-dcp Apr 15, 2024
57665c9
Merge pull request #1181 from NYCPlanning/DH4-toggle-all-layers-off
dhochbaum-dcp Apr 15, 2024
14106d0
Fix for overflowing historic districts on narrow windows when in mult…
dhochbaum-dcp Apr 15, 2024
ca0c9fa
Updated to use new version of @nycplanning/ember that has Search Hist…
dhochbaum-dcp Apr 16, 2024
401981d
Added looping, start on random slide
dhochbaum-dcp Apr 16, 2024
8ca534d
Added new slides
dhochbaum-dcp Apr 17, 2024
202d2b0
Corrected bolding
dhochbaum-dcp Apr 17, 2024
8d99429
Merge pull request #1200 from NYCPlanning/1198/update-default-aerial-…
bmarchena Apr 19, 2024
e4f73e9
Added superscript to main header, new section to features page
dhochbaum-dcp Apr 23, 2024
8aadc56
Moved array to a variable
dhochbaum-dcp Apr 23, 2024
465982e
Merge pull request #1183 from NYCPlanning/DH5-search-history
dhochbaum-dcp Apr 24, 2024
f788700
Update map width when toggling sidebar
bmarchena Apr 25, 2024
a07b39f
Merge branch 'develop' into DH3-collapse-sidebar
dhochbaum-dcp May 1, 2024
b87c49a
Removed duplicate import statement
dhochbaum-dcp May 1, 2024
6ac3532
Merge branch 'DH3-collapse-sidebar' of github.com:NYCPlanning/labs-zo…
bmarchena May 1, 2024
7c60973
Window resizes when sidebar is hidden in order to elimenate the white…
dhochbaum-dcp May 6, 2024
f855a20
Changed padding to vertically center the arrow
dhochbaum-dcp May 6, 2024
2b07fba
Corrected typos, added other features to /features. Only the Zoning D…
dhochbaum-dcp May 6, 2024
9128ce7
Removed commented out code
dhochbaum-dcp May 8, 2024
5ab733e
Merge pull request #1194 from NYCPlanning/DH7-measurement-tools
dhochbaum-dcp May 8, 2024
86b65eb
Merge pull request #1185 from NYCPlanning/DH6-layer-bookmarks
dhochbaum-dcp May 8, 2024
06a08c6
Corrected spelling error, removed !important and commented out code
dhochbaum-dcp May 8, 2024
00c1d7e
Merge pull request #1179 from NYCPlanning/DH1-link-icons
dhochbaum-dcp May 8, 2024
1036aa2
Fixed issue with displayed selections not updating appropriately
dhochbaum-dcp May 8, 2024
5e7b3da
Merge pull request #1186 from NYCPlanning/DH3-collapse-sidebar
dhochbaum-dcp May 8, 2024
0cd095d
Fixed all the issues I could find with highlighting
dhochbaum-dcp May 8, 2024
41264a6
Merge pull request #1182 from NYCPlanning/DH8-multilot
dhochbaum-dcp May 9, 2024
58eb9c4
Changed slide background color to light gray
dhochbaum-dcp May 17, 2024
df80847
Updated modal text
dhochbaum-dcp May 20, 2024
2607a62
Merge branch 'develop' into DH0-announcement-modal
dhochbaum-dcp May 20, 2024
c7d3899
Fixed merge issues
dhochbaum-dcp May 20, 2024
369bd9b
Updated modal message
dhochbaum-dcp May 20, 2024
5b36ef1
Removed comments
dhochbaum-dcp May 21, 2024
82c2274
Merge pull request #1197 from NYCPlanning/DH0-announcement-modal
dhochbaum-dcp May 21, 2024
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
31 changes: 31 additions & 0 deletions app/components/default-modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Component from '@ember/component';

const TOTAL_SLIDES = 7;

export default Component.extend({
tagName: '',
open: true,
slideNumber: Math.floor(Math.random() * TOTAL_SLIDES) + 1, // start on a random slide

actions: {
toggleModal() {
this.toggleProperty('open');
},
nextSlide() {
if (this.slideNumber < TOTAL_SLIDES) {
this.set('slideNumber', this.slideNumber + 1);
} else {
// comment out the line below to disable infinite looping
this.set('slideNumber', 1);
}
},
prevSlide() {
if (this.slideNumber > 1) {
this.set('slideNumber', this.slideNumber - 1);
} else {
// comment out the line below to disable infinite looping
this.set('slideNumber', TOTAL_SLIDES);
}
},
},
});
53 changes: 52 additions & 1 deletion app/components/layer-record-views/tax-lot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import carto from 'labs-zola/utils/carto';
import config from 'labs-zola/config/environment';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import bblDemux from 'labs-zola/utils/bbl-demux';
import LayerRecordComponent from './-base';

const { specialDistrictCrosswalk } = config;
Expand Down Expand Up @@ -310,6 +313,38 @@ const landuseLookup = {
};

export default class TaxLotRecordComponent extends LayerRecordComponent {
@service router;

@service mainMap;

@action
linkToLotComparison() {
this.router.transitionTo(
'map-feature.lot-comparison',
this.model.borocode,
this.model.block,
this.model.lot,
0,
0,
0
);
}

@action
removeLotFromComparison(otherModelId) {
this.set('mainMap.comparisonSelected', null);
const { boro, block, lot } = bblDemux(otherModelId);
this.router.transitionTo(
'map-feature.lot-comparison',
boro,
block,
lot,
0,
0,
0
);
}

get bldgclassname() {
return bldgclassLookup[this.model.bldgclass];
}
Expand All @@ -325,6 +360,13 @@ export default class TaxLotRecordComponent extends LayerRecordComponent {
return `${boroLookup[cdborocode]} Community District ${cd}`;
}

get boroSlashCd() {
const borocd = this.model.cd;
const cdborocode = `${borocd}`.substring(0, 1);
const cd = parseInt(`${borocd}`.substring(1, 3), 10).toString();
return `${boroLookup[cdborocode].replace(' ', '-').toLowerCase()}/${cd}`;
}

get cdURLSegment() {
const borocd = this.model.cd;
const borocode = this.model.borocode; // eslint-disable-line prefer-destructuring
Expand All @@ -333,6 +375,13 @@ export default class TaxLotRecordComponent extends LayerRecordComponent {
return `${cleanBorough}/${cd}`;
}

get googleMapsURL() {
const encodedAddress = encodeURIComponent(
`${this.model.address}, ${this.model.zipcode}`
);
return `https://www.google.com/maps/search/?api=1&query=${encodedAddress}`;
}

get landusename() {
return landuseLookup[this.model.landuse];
}
Expand Down Expand Up @@ -441,7 +490,9 @@ export default class TaxLotRecordComponent extends LayerRecordComponent {
}

get digitalTaxMapLink() {
return `https://propertyinformationportal.nyc.gov/parcels/${this.model.condono ? 'condo' : 'parcel'}/${this.model.bbl}`;
return `https://propertyinformationportal.nyc.gov/parcels/${
this.model.condono ? 'condo' : 'parcel'
}/${this.model.bbl}`;
}

get zoningMapLink() {
Expand Down
11 changes: 10 additions & 1 deletion app/components/main-header.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import { tracked } from '@glimmer/tracking';

export default class MainHeaderComponent extends Component {
@service('print') printSvc;

@service() media;

bookmarks;
@tracked bookmarks;

@tracked savedLayerSets;

@computed('bookmarks.length', 'savedLayerSets.length')
get totalBookmarks() {
return this.bookmarks.length + this.savedLayerSets.length;
}
}
38 changes: 35 additions & 3 deletions app/components/main-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ import { alias } from '@ember/object/computed';
import bblDemux from '../utils/bbl-demux';
import drawnFeatureLayers from '../layers/drawn-feature';
import selectedLayers from '../layers/selected-lot';
import comparisonSelectedLayers from '../layers/comparison-selected-lot';

const selectedFillLayer = selectedLayers.fill;
const selectedLineLayer = selectedLayers.line;

const comparisonSelectedFillLayer = comparisonSelectedLayers.fill;
const comparisonSelectedLineLayer = comparisonSelectedLayers.line;

// Custom Control
const MeasurementText = function () {};

Expand Down Expand Up @@ -54,7 +58,7 @@ export default class MainMap extends Component {

highlightedLayerId = null;

widowResize() {
windowResize() {
return new Promise((resolve) => {
setTimeout(() => {
const resizeEvent = window.document.createEvent('UIEvents');
Expand Down Expand Up @@ -114,6 +118,15 @@ export default class MainMap extends Component {
};
}

@computed('mainMap.comparisonSelected')
get comparisonSelectedLotSource() {
const comparisonSelected = this.get('mainMap.comparisonSelected');
return {
type: 'geojson',
data: comparisonSelected.get('geometry'),
};
}

@computed('mainMap.drawMode')
get interactivity() {
const drawMode = this.get('mainMap.drawMode');
Expand All @@ -124,6 +137,10 @@ export default class MainMap extends Component {

selectedLineLayer = selectedLineLayer;

comparisonSelectedFillLayer = comparisonSelectedFillLayer;

comparisonSelectedLineLayer = comparisonSelectedLineLayer;

@action
handleMapLoad(map) {
window.map = map;
Expand Down Expand Up @@ -211,7 +228,22 @@ export default class MainMap extends Component {
if (bbl && !ceqr_num) {
// eslint-disable-line
const { boro, block, lot } = bblDemux(bbl);
this.router.transitionTo('map-feature.lot', boro, block, lot);
if (this.router.currentRoute.name === 'map-feature.lot-comparison') {
if (!this.mainMap.comparisonSelected) {
this.mainMap.set('comparisonSelected', this.mainMap.selected);
}
this.router.transitionTo(
'map-feature.lot-comparison',
this.router.currentRoute.params.boro,
this.router.currentRoute.params.block,
this.router.currentRoute.params.lot,
boro,
block,
lot
);
} else {
this.router.transitionTo('map-feature.lot', boro, block, lot);
}
}

if (ulurpno) {
Expand Down Expand Up @@ -273,6 +305,6 @@ export default class MainMap extends Component {

this.set('printSvc.enabled', true);

await this.widowResize();
await this.windowResize();
}
}
Loading
Loading