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

Feature/test rechart #723

Open
wants to merge 9 commits into
base: development/1.0
Choose a base branch
from

Conversation

JeanMarcMilletScality
Copy link
Contributor

Component:

Description:

Design:

Breaking Changes:

  • [] Breaking Changes

Closes: #ISSUE_NUMBER

@bert-e
Copy link
Contributor

bert-e commented May 23, 2024

Hello jeanmarcmilletscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented May 23, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@bert-e
Copy link
Contributor

bert-e commented May 23, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@JeanMarcMilletScality JeanMarcMilletScality marked this pull request as ready for review May 30, 2024 12:12
@bert-e
Copy link
Contributor

bert-e commented May 30, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

Comment on lines +30 to +33
// console.log('tooltip', tooltipRef.current);
// console.log('tooltipCoord', tooltipRef.current.getBoundingClientRect());
// left and top < 0 = tooltip is out of the screen
// right or bottom > window.innerWidth or window.innerheight = tooltip is out of the screen
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// console.log('tooltip', tooltipRef.current);
// console.log('tooltipCoord', tooltipRef.current.getBoundingClientRect());
// left and top < 0 = tooltip is out of the screen
// right or bottom > window.innerWidth or window.innerheight = tooltip is out of the screen
// left and top < 0 = tooltip is out of the screen
// right or bottom > window.innerWidth or window.innerheight = tooltip is out of the screen

@bert-e
Copy link
Contributor

bert-e commented Jun 24, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

Copy link
Contributor

@JBWatenbergScality JBWatenbergScality left a comment

Choose a reason for hiding this comment

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

I think we should unit test this component and ensure that the screen readers description of it is intelligible

Comment on lines +3 to +26
type HistoryAlertContextType = {
selectedDate: number;
setSelectedDate: (date: number) => void;
};
export const HistoryAlertContext = createContext<
HistoryAlertContextType | undefined
>(undefined);

export const HistoryAlertProvider = ({ children }) => {
const [selectedDate, setSelectedDate] = useState<number>(Date.now());
return (
<HistoryAlertContext.Provider value={{ selectedDate, setSelectedDate }}>
{children}
</HistoryAlertContext.Provider>
);
};

export const useHistoryAlert = () => {
const context = useContext(HistoryAlertContext);
if (!context) {
return { selectedDate: null };
}
return context;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

This component is not specific to alerts, it is more a "Point in time" selector/provider that can be used more widely.


const StyledRange = styled.input`
width: 600px;
padding: 0; /* nécessaire pour IE */
Copy link
Contributor

Choose a reason for hiding this comment

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

Please review those french comments

endDate: number;
};

export const HistoryAlertSlider = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly I think this could be used in other context than Alerting. It is a "Point in time Slider/Selector", not sure how to name it yet

Comment on lines +89 to +92
start,
end,
startDate,
endDate,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure to understand why we have both Start and StartDate props, same for end and endDate

Comment on lines +18 to +20
const width = ((selectedDate - startDate) / (endDate - startDate)) * 600;
const leftPosition = width - 132 / 2;
return `auto auto -4px ${leftPosition}px`;
Copy link
Contributor

Choose a reason for hiding this comment

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

From a reader perspective it looks like math black magic here, maybe we can introduce variables to explain what is

  • 600
  • 132
  • -4px ?

Comment on lines +26 to +29
start: number,
end: number,
startDate: number,
endDate: number,
Copy link
Contributor

Choose a reason for hiding this comment

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

What the meaning of those props ? IMO the signature of the function is not very clear to understand what it does

Comment on lines +98 to +100
DATE_FORMATER.format(history.selectedDate) +
'T' +
TIME_SECOND_FORMATER.format(history.selectedDate)
Copy link
Contributor

Choose a reason for hiding this comment

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

history.selectedDate.toISOString ?

offset={20}
isAnimationActive={false}
cursor={false}
content={<CustomTooltip tooltipData={tooltipData}></CustomTooltip>}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could be self-closed

allowDataOverflow={true}
dataKey="start"
type="number"
domain={[new Date(start).getTime(), new Date(end).getTime()]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
domain={[new Date(start).getTime(), new Date(end).getTime()]}
domain={[startDate, endDate]}

tickSize={8}
minTickGap={0}
interval={0}
ticks={getDataListOptions(startDate, endDate)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ticks={getDataListOptions(startDate, endDate)}
ticks={getTicks(startDate, endDate)}

@bert-e
Copy link
Contributor

bert-e commented Jun 24, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

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.

3 participants