Skip to content

Conversation

@nikkikapadia
Copy link
Member

changed the changed reason types on the frontend to reflect the changes i've made to the backend. I've also changed up the wording for the frontend errors as suggested. Widgets have been simplified to one sentence and queries have slightly changed wording to not use "dropped"

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 14, 2025
@nikkikapadia nikkikapadia marked this pull request as ready for review October 15, 2025 15:18
@nikkikapadia nikkikapadia requested a review from a team October 15, 2025 15:18
@nikkikapadia nikkikapadia requested a review from a team as a code owner October 15, 2025 15:18
Comment on lines +147 to +153
const combinedWarnings = [
...columnsDropped,
...equationsDroppedParsed,
...orderbyDroppedWithoutNegation,
];
const allWarningsSet = new Set(combinedWarnings);
const allWarnings = [...allWarningsSet];
Copy link
Member Author

Choose a reason for hiding this comment

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

doing this because some of the fields could be duplicated and we don't need to see duplicate fields

})
orderbyDropped.push(
...changedReason.orderby.flatMap(orderby =>
typeof orderby.reason === 'string' ? orderby.orderby : orderby.reason
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Orderby Reason Incorrectly Added as Field Name

The flatMap for orderbyDropped sometimes adds orderby.reason (which can be a string array) instead of the orderby.orderby field name. This causes the warning message to incorrectly display reasons as dropped fields, and may lead to a runtime error when string operations are performed on an array.

Fix in Cursor Fix in Web

typeof orderby.reason === 'string' ? orderby.reason : orderby.reason.join(', ');

// make sure that the reason and the orderby aren't the same and word it correctly
return typeof orderby.reason === 'string' || orderbyWithoutPrefix === reasonText
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Incorrect Orderby Warning Logic

The DroppedFieldsAlert component's orderby warning logic incorrectly determines the message to display. The condition meant to identify if the orderby field itself is the reason for being dropped misinterprets both string and array reason types, resulting in an inaccurate warning message.

Fix in Cursor Fix in Web

@nikkikapadia nikkikapadia merged commit 88c9d06 into master Oct 15, 2025
46 checks passed
@nikkikapadia nikkikapadia deleted the nikki/fix/dropped-fields-wording-fixes branch October 15, 2025 15:50
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants