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

Major overhaul of charts #44

Merged
merged 22 commits into from
Jun 8, 2023
Merged

Major overhaul of charts #44

merged 22 commits into from
Jun 8, 2023

Conversation

flenter
Copy link
Member

@flenter flenter commented Jun 7, 2023

This PR:

  • improves general stying,
  • adds loading indicator
  • adds support for showing errors on the graphs
  • largelyunifies the look & feel of the multi chart & single chart graphs
  • adds a toggle for showing prometheus query
  • upgrades typescript to 5(.1.3)
output.mp4

<StyledButton
onClick={() => {
navigator.clipboard.writeText(query);
if (ref.current) {

Choose a reason for hiding this comment

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

i think you can safely combine the two ifs here? perhaps i'm missing something


export function FunctionChart(props: Props) {
const { query, timeRange, setTimeRange, title, description = "" } = props;
export const FunctionChart = function FunctionChart(props: Props) {

Choose a reason for hiding this comment

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

Suggested change
export const FunctionChart = function FunctionChart(props: Props) {
export function FunctionChart(props: Props) {

import { getNonce } from "../../utils";
import { vscode } from "../chart";

const requests: Record<string, (result: Result<Timeseries[], String>) => void> =

Choose a reason for hiding this comment

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

i'm not sure how often items are changed in requests, but it might be beneficial performance-wise to use Map here instead

@flenter flenter merged commit d13655d into main Jun 8, 2023
@flenter flenter deleted the refresh branch June 8, 2023 11:57
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