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

EES-5373: Remove FullTableQuery.BoundaryLevel #5119

Merged
merged 3 commits into from
Aug 12, 2024
Merged

EES-5373: Remove FullTableQuery.BoundaryLevel #5119

merged 3 commits into from
Aug 12, 2024

Conversation

tomjonesdev
Copy link
Collaborator

@tomjonesdev tomjonesdev commented Aug 2, 2024

On the back end Admin and Data API services, FullTableQueryRequest/FullTableQuery
are being used by the frond end to execute a table query and optionally specify any boundary level data which should be returned so that for content page map charts, the boundary level data can be fetched and maps can be rendered.

The front end should be responsible for including the BoundaryLevel in the request if boundary level data should be returned, i.e. because boundary level data is needed for rendering a map chart.

This PR moves the property from the query into a separate parameter.

@tomjonesdev tomjonesdev force-pushed the EES-5373 branch 5 times, most recently from 726077d to 6df7a9d Compare August 8, 2024 08:30
Comment on lines -2 to -5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there's an issue to raise here with the rest of the team because it looks like when organising imports Visual Studio is organising them alphabetically and Rider is doing the same but with System imports first.

That adds up to quite a few extra lines to review in PR's.

Copy link
Collaborator Author

@tomjonesdev tomjonesdev Aug 12, 2024

Choose a reason for hiding this comment

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

What's the rationale for System being first when the other imports are alphabetical? This ticket references the option being added to Rider - the same option is available on VS but is disabled by default.
image

Copy link
Collaborator

@benoutram benoutram Aug 12, 2024

Choose a reason for hiding this comment

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

I think this will be the default option in Rider, and up until recently all team members used Rider, so a large percentage of the code will have System imports ordered first.

Taken from StyleCop analyzer, the rationale for ordering System imports first is:

Placing all System using directives at the top of the using directives can make the code cleaner and easier to read, and can help make it easier to identify the namespaces that are being used by the code.

I've put this as an item to discuss at the team meeting as it turns out we can try and enforce this an EditorConfig rule one way or the other depending on what we decide.

See https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/dotnet-formatting-options

CancellationToken cancellationToken = default)
{
return await _dataBlockService
.GetDataBlockVersionForRelease(releaseVersionId: releaseVersionId, dataBlockParentId: dataBlockParentId)
.OnSuccess(dataBlockVersion => GetReleaseDataBlockResults(dataBlockVersion, cancellationToken))
.OnSuccess(dataBlockVersion => GetReleaseDataBlockResults(dataBlockVersion, boundaryLevelId, cancellationToken))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Worth checking formatting on this file for long lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I run pnpm format before raising a PR but that doesn't seem to run on .cs files. Afaik VS doesn't have a line length setting because there's a visual word wrapper which avoids changing the actual code/structure.
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok I remember that we've chatted about this before. Might be worth chatting to @jack-hive to see if he's found a solution? I've added a note to the team meeting board to discuss the differences between IDE's when formatting long lines.

@tomjonesdev tomjonesdev merged commit bfa04b2 into dev Aug 12, 2024
7 checks passed
@tomjonesdev tomjonesdev deleted the EES-5373 branch August 12, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants