Skip to content

[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

Closed
wants to merge 1 commit into from

Conversation

LiSa20120
Copy link
Contributor

Added section for version number

before clicking
before

after clicking
after

@nmanovic nmanovic requested a review from bsekachev December 12, 2019 14:10
(): 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(
Copy link
Member

Choose a reason for hiding this comment

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

@LiSa20120

We shouldn't make server requests here.
There are two problems:

  1. 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.
  2. 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"}}>
Copy link
Member

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.

Copy link
Contributor Author

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 :)

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

about
@bsekachev Have a look at it.

Copy link
Contributor Author

@LiSa20120 LiSa20120 Jan 3, 2020

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
Copy link
Member

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).

@bsekachev
Copy link
Member

@LiSa20120

Hi, good work.
Nevertheless we have some comments about the solution.

@bsekachev
Copy link
Member

@LiSa20120

A couple additional comments.
Container cannot be built because of the error: Module not found: Error: Can't resolve 'axios' in '/tmp/cvat-ui/src/components/header'
And please, look at issues which have been found by Codacy

@nmanovic nmanovic changed the title Add about cvat decription and version number [WIP] Add about cvat decription and version number Dec 13, 2019
@nmanovic
Copy link
Contributor

@LiSa20120 , please look at the PR from Boris: #963. It has about button. Just need to implement it. If you are not going to work on the PR please close it.

image

@LiSa20120
Copy link
Contributor Author

@bsekachev Thank you.
I would like to work on it.

@nmanovic
Copy link
Contributor

Hi @LiSa20120 , I will close the PR for now. Please don't hesitate to reopen it when you are ready.

@nmanovic nmanovic closed this Dec 23, 2019
@LiSa20120 LiSa20120 deleted the cvat-about branch January 14, 2020 13:16
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