Skip to content

Conversation

@antonszilasi
Copy link
Contributor

@antonszilasi antonszilasi commented Feb 16, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@antonszilasi antonszilasi changed the title Dev/anton/153 WIP to address issue 153 and sketching out some ideas Feb 16, 2025
@macumber
Copy link
Collaborator

Thanks @antonszilasi! I think the first thing to do is to create a mockup of the UI that we want to make, the unmethours post suggested this from Trace:

image

Once we have the mockup, we can create the widget to match it.

@macumber
Copy link
Collaborator

macumber commented Feb 16, 2025

What about something like below:

image

We would look through the file and identify all the design day types and levels, then group them in a table. Each row would allow selecting one radio button. Each column would have a select all button to select all in that column

@antonpsd
Copy link

image

@jmarrec jmarrec marked this pull request as ready for review February 27, 2025 15:45
@jmarrec
Copy link
Collaborator

jmarrec commented Feb 27, 2025

Marking the PR as non-draft because I want a CI run on it. @antonszilasi I fixed up the clang format and the cppcheck thingy quickly.

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 27, 2025

What about something like below:

image

We would look through the file and identify all the design day types and levels, then group them in a table. Each row would allow selecting one radio button. Each column would have a select all button to select all in that column

I like that a lot.

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 27, 2025

I started a test bed here in case it's useful: https://godbolt.org/z/rxern817h

@antonszilasi
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

{
return false;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jmarrec somehow your other comments were lost but I addressed two of them in

78291c1

and a5263ba

@antonszilasi
Copy link
Contributor Author

antonszilasi commented Mar 1, 2025

Importing ddy which is missing 0.4% design days
https://github.com/user-attachments/assets/d654ae29-e2cd-4267-ae15-9d34aedc9ce6

@antonszilasi antonszilasi changed the title WIP to address issue 153 and sketching out some ideas Attempting to address 153 Mar 1, 2025
@antonszilasi antonszilasi changed the title Attempting to address 153 Attempting to address 153, by allowing user to specifically import 99%,99.6%, 0.4%,1% and 2% annual design days Mar 1, 2025
@macumber
Copy link
Collaborator

macumber commented Mar 2, 2025

I'm trying to be nice and include GIFs :-) You can see there is some existing ugliness in the DesignDayGridView when deleting DDYs on the Location tab (it doesn't fully delete/hide the row), we could try to clean that up in this PR:

ImportDDYs

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 4, 2025

I started a test bed here in case it's useful: https://godbolt.org/z/rxern817h

I think your interface is nice as is @macumber. I was originally thinking we've do something fancier/more explicitly per this link I started, but I don't know if it's worth overdoing it.

    std::vector<std::string> heatingPercentages = {"99.6%", "99%"};
    std::vector<std::string> coolingPercentages = {"2%", "1%", ".4%"};

    std::vector<DesignDayInfo> designDayTypes = {
        // Heating
        {.day_type = DesignDayInfo::DayType::Heating, .lookup_string = "DB", .name = "Heating", .tooltip = "Sizing heating equipment"},
        {.day_type = DesignDayInfo::DayType::Heating, .lookup_string = "WS=>MCDB", .name = "Heating Windy", .tooltip = "Used for sizing based on infiltration"},
        {.day_type = DesignDayInfo::DayType::Heating, .lookup_string = "DP=>MCDB", .name = "Heating Humid", .tooltip = "Used for sizing dehumidification systems"},

        // Cooling
        {.day_type = DesignDayInfo::DayType::Cooling, .lookup_string = "DB=>MWB", .name = "Cooling", .tooltip = "Sizing Chillers or air-conditioning units"},
        {.day_type = DesignDayInfo::DayType::Cooling, .lookup_string = "WB=>MDB", .name = "Cooling Latent", .tooltip = "Used to size cooling towers, evap-coolers, and fresh-air ventilation systems"},
        {.day_type = DesignDayInfo::DayType::Cooling, .lookup_string = "DP=>MDB", .name = "Cooling Dehum", .tooltip = "Used for sizing dehumidification systems"},
        {.day_type = DesignDayInfo::DayType::Cooling, .lookup_string = "Enth=>MDB", .name = "Cooling Enthalpy", .tooltip = "Used for sizing based on infiltration and/or ventilation"},

    };

It would look kinda like your mockup but with extra rows for the cooling ones and tooltips

image

@macumber macumber requested a review from Copilot April 25, 2025 00:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aims to address issue 153 by allowing users to selectively import design days with specific percentages (99%, 99.6%, 0.4%, 1%, and 2%) to better refine annual design day selections.

  • Added grid cell selection signal emissions in OSObjectSelector.
  • Introduced style updating and header/visibility properties in OSCellWrapper.
  • Implemented a dialog in LocationTabView for selecting design days and updated associated test cases.

Reviewed Changes

Copilot reviewed 11 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/shared_gui_components/OSObjectSelector.cpp Emits grid row selection changes after updating cell info.
src/shared_gui_components/OSCellWrapper.hpp & OSCellWrapper.cpp Adds updateStyle functionality and new member variables to control style.
src/openstudio_lib/LocationTabView.hpp & LocationTabView.cpp Introduces design day selection dialog, SortableDesignDay helper, and modifies design day insertion/removal logic.
src/openstudio_lib/test/LocationTab_GTest.cpp Updates test cases for SortableDesignDay behavior.
.github/workflows/app_build.yml Updates Conan install flags for improved compatibility with recent Clang.
Files not reviewed (12)
  • src/openstudio_lib/CMakeLists.txt: Language not supported
  • translations/OpenStudioApp_ar.ts: Language not supported
  • translations/OpenStudioApp_ca.ts: Language not supported
  • translations/OpenStudioApp_de.ts: Language not supported
  • translations/OpenStudioApp_el.ts: Language not supported
  • translations/OpenStudioApp_es.ts: Language not supported
  • translations/OpenStudioApp_fa.ts: Language not supported
  • translations/OpenStudioApp_fr.ts: Language not supported
  • translations/OpenStudioApp_he.ts: Language not supported
  • translations/OpenStudioApp_hi.ts: Language not supported
  • translations/OpenStudioApp_it.ts: Language not supported
  • translations/OpenStudioApp_ja.ts: Language not supported
Comments suppressed due to low confidence (1)

src/shared_gui_components/OSCellWrapper.cpp:585

  • [nitpick] Consider adding inline comments to clarify the bit ordering in the 'style' bitset to help future maintainers understand how the style string is constructed.
std::bitset<2> style;

@jmarrec jmarrec changed the title Attempting to address 153, by allowing user to specifically import 99%,99.6%, 0.4%,1% and 2% annual design days Fix #153 - Allow users to specifically import 99%,99.6%, 0.4%,1% and 2% annual design days Jul 4, 2025
@jmarrec
Copy link
Collaborator

jmarrec commented Jul 4, 2025

On Ubuntu the dialog is not sized properly (title truncated) and looks quite dull.

image

Importing a DDY file that has a single DDY with a "custom" name such as San Francisco Intl Heating DDY

image

jmarrec added 4 commits July 4, 2025 10:56
/opt/Qt/6.5.2/gcc_64/bin/lupdate -project /media/DataExt4/Software/Others/OSApp-build-release/translations/.lupdate/translations_interface_project.json -no-obsolete
@jmarrec
Copy link
Collaborator

jmarrec commented Jul 4, 2025

I did a bit of styling, adding some high level entry, and I updated the french translation.

image

image

image

@jmarrec
Copy link
Collaborator

jmarrec commented Jul 4, 2025

@antonszilasi Thanks for this work, this is going to be a nice improvement for everyone!

I made a couple of changes, if @antonszilasi and/or @macumber could glance them over that'd be great. Then merge away!

@macumber
Copy link
Collaborator

macumber commented Jul 4, 2025

Changes look great @jmarrec, thanks for updating the languages

@macumber macumber merged commit 37ffec2 into develop Jul 4, 2025
13 of 22 checks passed
@macumber macumber deleted the dev/anton/153 branch July 4, 2025 15:12
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow users to choose which design days (0.4%, 1%, 2%) are imported

4 participants