-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[WIP] Add about cvat decription and version number #944
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
Conversation
(): void => { | ||
const t = localStorage.getItem('token'); | ||
const token ='Token '+ t.replace(/['"]+/g, '') | ||
const data = axios.get(`${serverHost}/api/v1/server/about`,{ headers: {Authorization : token}}).then( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't make server requests here.
There are two problems:
- To be consistent and do not do extra requests, we should use
redux
here (create reducer [for example ServerInfoReducer], add it to CVAT storage, add some actions for the reducer) and provide some props from the storage to the component. Look for example how we get users (usersReducer, usersActions) in such a scheme. - You do not need to do request manually with axios and add an authorization token. Just use cvat-core to get this data:
const core = getCore();
core.server.about()
@@ -62,6 +67,34 @@ function HeaderContainer(props: Props): JSX.Element { | |||
> | |||
Tasks | |||
</Button> | |||
<Popover placement="bottom" title={content} content={text} trigger="click" overlayStyle={{width : "50vw"}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you about it should be a switchable window, but this component doesn't look pretty.
I believe a Modal window would be great here.
You know, a tool name, an image, description, a version, the github link, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @bsekachev
What image do you want to include here?
As of now, I have the tool name, version number and description (in the same order). Also, I believe adding a github link would make it redundant as it already appears on the header. Kindly let me know about these. Thanks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @LiSa20120
To be honest, I don't know what image can we use here. Probably it's better to skip this moment for now.
I have some ideas about content of the dialog window:
- The name of the tool
- Tool description
- Server version (can get via core.server.about())
- Core version (can get via core.client.version)
- Release notes ("what's new") (just a link to the section of the
CHANGELOG.md
file) - License information (a link to
LICENSE
file in the repository) - "Need help?" (a link to the gitter chat)
- Maybe link to Forum on Intel Developer Zone
@nmanovic, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsekachev Have a look at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsekachev How are you converting the md files to html?
Should we install react-markdown?
} | ||
} | ||
> | ||
About |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the best place to put this button is menu in header (near with logout button).
Hi, good work. |
A couple additional comments. |
@LiSa20120 , please look at the PR from Boris: #963. It has |
@bsekachev Thank you. |
Hi @LiSa20120 , I will close the PR for now. Please don't hesitate to reopen it when you are ready. |
Added section for version number
before clicking

after clicking
