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

feat(UI): Another batch of minor improvements #213

Merged
merged 5 commits into from
Oct 7, 2024
Merged

Conversation

grafakus
Copy link
Contributor

@grafakus grafakus commented Oct 4, 2024

✨ Description

Related issue(s): -

📖 Summary of the changes

Code component

Very small refactor to better separate concerns better (follow-up of a previous PR)

Plugin info dropdown

Added a link to our CHANGELOG and a link for reporting an issue:
image

Diff flame graph view:

Initialize filters when coming from "Labels" or "Flame graph", here's a short video:

Screen.Recording.2024-10-04.at.17.54.42.mov

🧪 How to test?

Manually.

@github-actions github-actions bot added the feat label Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

Unit test coverage

Lines Statements Branches Functions
Coverage: 10%
10.78% (428/3967) 8.67% (120/1384) 8.12% (102/1255)

@grafakus grafakus requested a review from ifrost October 4, 2024 13:50
export function CodeContainer({ dataSourceUid, functionDetails }: CodeContainerProps) {
const { data, actions } = useCodeContainer(dataSourceUid, functionDetails);

if (data.fetchError && (data.fetchError as HttpClientError)?.response?.status !== 404) {
displayError(data.fetchError, ['Failed to fetch file information!', (data.fetchError as Error).message]);
}

const codeLines: CodeLine[] = data.lines.map((line) => ({ ...line, line: line.line || '???' }));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@grafakus grafakus changed the title feat(UI): Minor fix/improvement feat(UI): Another batch of minor improvements Oct 4, 2024
ifrost
ifrost previously approved these changes Oct 7, 2024
Copy link
Contributor

@ifrost ifrost left a comment

Choose a reason for hiding this comment

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

// preserve existing filters only when switching to "Labels" or "Flame graph"
if (![ExplorationType.LABELS, ExplorationType.FLAME_GRAPH].includes(nextExplorationType as ExplorationType)) {
// preserve existing filters only when switching to "Labels", "Flame graph" or "Diff flamge graph"
if (
Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely a great improvement 🙌

One small nit: I was a bit surprised with following flow:

  • I set some labels in Labels view
  • I go to Diff View and remove (or change both values to something else)
  • I switch back to Labels view (the labels are restored)

If I remove all labels in Diff View and go to labels I kind of expected to have no labels. I'm not sure how it should work in general though 😅 There are multiple cases (one label changed or removed), so it's not easy to make it super clear all the time. An alternative would be to have another input with "common labels" applied to both sides of the view + side filters added to add more granular labels. But that could add more noise to the UI 🤷

Not a blocker, just food for thought. Something we can keep an eye on and double check with UX.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the feedback. It's a tricky one indeed for the cases you mentioned. Let's see with UX.

…r/SceneProfilesExplorer.tsx

Co-authored-by: Piotr Jamróz <[email protected]>
@grafakus grafakus merged commit 8419560 into main Oct 7, 2024
4 of 5 checks passed
@grafakus grafakus deleted the fix/quick-fixes branch October 7, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants