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(FE): Centre aligning loading spinner with new Spinning Indicator #224

Merged
merged 3 commits into from
Jul 29, 2021

Conversation

Vimalraj571
Copy link
Contributor

@Vimalraj571 Vimalraj571 commented Jul 14, 2021

feat: Added new Spinner Component,Changed the Old Spinner indicator and also added the spinner on Center.

BREAKING CHANGE: Removed the old Spinner style and replaced with new Spinner Component

see the issue for details
Refs #223

@ankitnayan ankitnayan requested a review from jyash97 July 14, 2021 04:28
@Vimalraj571 Vimalraj571 changed the title issue_223_spin_indcator feat(FE): add New Spinning Indicator Jul 15, 2021
@Vimalraj571 Vimalraj571 changed the title feat(FE): add New Spinning Indicator feat(FE): Centre aligning loading spinner with new Spinning Indicator Jul 15, 2021
import { LoadingOutlined } from '@ant-design/icons';
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />;

const SpinerStyle = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

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

This will fail if we want to add spinner inside a Modal or a section since it uses position fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's check if we can use some components from antd solving our purpose for div. Maybe Grid? https://ant.design/components/grid/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jyash97 have checked in the modal ya its working fine screenshot

Screenshot from 2021-07-18 23-54-38

or did i need to remove the position property itself or i hv to use relative ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nidhi-tandon instead styled.div r u referring styles.Row nidhini? is it correct ?

right: 0;
`;

export const CustomSpinner = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have just Spinner component and pass props for different styles?

Also cant we just use Antd approach: https://codesandbox.io/s/ye0e6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jyash97 is like boolean props name as defaultSpiner type as boolean .Based boolean we have to render the Spinner indicator right yash?

tip,
}:{
size:string,
tip:string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets name this message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure!

tip:string,
})=>{
return(
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need a fragment here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool


export const DefaultSpinner = ()=>{
return(
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same no fragment here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

;)

import { useThemeSwitcher } from "react-css-theme-switcher";
import ROUTES from "Src/constants/routes";
import { IS_LOGGED_IN } from "Src/constants/auth";
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
import { CustomSpinner } from "./../components/Spiner";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we import from: Src/components/..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i didn't get this @jyash97 can u elaborate!

position: fixed;
z-index: 999;
height: 4em;
// width: 4em;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove commented code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup sure

@ankitnayan
Copy link
Collaborator

@nidhi-tandon @jyash97 @Vimalraj571 please check whether your input is pending in this PR. Let's try to merge this PR by the weekend.

@ankitnayan ankitnayan merged commit 888e3ff into SigNoz:main Jul 29, 2021
@pranay01
Copy link
Collaborator

pranay01 commented Dec 6, 2021

Fixes #223

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.

5 participants