Skip to content

Search Upgrades#231

Draft
vkoves wants to merge 8 commits intomainfrom
search-upgrades
Draft

Search Upgrades#231
vkoves wants to merge 8 commits intomainfrom
search-upgrades

Conversation

@vkoves
Copy link
Owner

@vkoves vkoves commented Aug 29, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Testing Instructions

Please describe the tests/QA that you did to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • If I added a large new feature, I added it to the release notes (ReleaseNotes.vue)

Data Update (if applicable):

@vkoves vkoves added enhancement New feature or request frontend Frontend/UI work labels Aug 29, 2025
@netlify
Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for radiant-cucurucho-d09bae ready!

Name Link
🔨 Latest commit 65f2578
🔍 Latest deploy log https://app.netlify.com/projects/radiant-cucurucho-d09bae/deploys/697ab9c9d11b47000893803a
😎 Deploy Preview https://deploy-preview-231--radiant-cucurucho-d09bae.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vkoves
Copy link
Owner Author

vkoves commented Aug 29, 2025

I'm seeing the out of memory issue again, so I think we need to add is_new as a Python property, so we don't need to fetch historic data to determine that and do filtering.

Copy link
Collaborator

@hunter-yeago hunter-yeago left a comment

Choose a reason for hiding this comment

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

Only thing that has to change is the x-scroll on mobile for the input of the search input (the one with width: 20rem;) - otherwise I've proposed a couple of changes to the code. Could go either way really though!

// Non reporting isn't new
if (reportedYears.length === 0) {
// New buildings have exactly 1 year with reported data
if (yearsWithReportedData.length !== 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible for this to be triggered if the building has only one year of reported data, but that is not the most recent year? For example, reported data only for 2019 but for no other year?

@@ -41,13 +44,19 @@ export default class Search extends Vue {
BuildingBenchmarkStats;
Copy link
Collaborator

Choose a reason for hiding this comment

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

On line 43
export default class Search extends Vue {

I am getting the following error:
A module cannot have multiple default exports.ts-plugin(2528)

... though I don't see any other default exports? Strange.

!this.propertyTypeFilter &&
!this.gradeFilter &&
!this.gradeQuintileFilter
!this.gradeQuintileFilter &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this used anywhere in the filter? I see gradeFilter being used, but this seems to be initialized without being used unless I'm missing something.

/**
* Get all active filter configurations
*/
private getActiveFilters() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@vkoves

This is my first time making a code change to a PR so forgive me if this breaches any QA etiquette.

Just wanted to propose an alternative solution for getting the active filters besides the if statements / ternarys. Feel free to roll this back if you prefer to keep the old way!

Either way, from my testing on the frontend, the filters are working great!

</div>
</div>

<div class="checkbox-row">
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of moving these inputs to the same line as the Property Type / Grade Filter? It's a small thing but I feel like it would look a little nicer if all of the filters were on one line and maybe had a consistent style and wrapped only when the viewport gods demand. Certainly not a hill I'm willing to be smited on though ⚡

gap: 0.5rem;
padding: 0.5rem 1rem;
input {
width: 20rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Causes x-scroll on mobile

may i suggest:
width: min(100%,20rem);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another thought - not pertinent to this PR but I wonder if there's a way we can make it a little clearer that there is more to see on this table on mobile. For example, we can have it that the X-scrollbar is always showing.

Or maybe at a certain viewport instead of it still being a scrollable table, instead you can click on the item and it'll show a box underneath with the rest of the information?

A bit of a bigger refactor so not saying to do that now, but yeah. It's just a big table to have to scroll through, especially if you want to view multiple buildings. Have to keep scrolling back and forth over and over again to see multiple buildings. Might be a faster way. But of course... we should verify that this is something that any users we have now are actually looking to have added before putting in the work, if we think we should...

Makes me think - for the people that you know who use the site - do they primarily do so through mobile or desktop?

@vkoves
Copy link
Owner Author

vkoves commented Oct 13, 2025

@hunter-yeago - this is an old draft PR with some new search stuff, so I actually need to merge with master and take advantage of the new fields I've added in. I think maybe you got something confused, I wanted review on PR #245! (I just moved that to open)

@hunter-yeago
Copy link
Collaborator

@vkoves Ah. My bad. You know, they don't have schools in Florida. So I'm still learning how to read.

Taking a look at the other PR now.

@vkoves
Copy link
Owner Author

vkoves commented Feb 4, 2026

Talking in person, the expand collapse is a bit overkill, I should move the search stuff back to one line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend Frontend/UI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants