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

SVG Octicon fixes #10237

Merged
merged 9 commits into from
Feb 12, 2020
Merged

SVG Octicon fixes #10237

merged 9 commits into from
Feb 12, 2020

Conversation

jolheiser
Copy link
Member

@jolheiser jolheiser commented Feb 11, 2020

A handful of fixes for Octicons. Noticed after clicking around try a little.

Moved the JS svg function to another file so it can be imported by other files as needed.

Also moved variables suburl and staticPrefix to the global window.config object so they don't need to be passed around.

Signed-off-by: jolheiser <[email protected]>
@techknowlogick techknowlogick added type/bug topic/ui Change the appearance of the Gitea UI skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Feb 11, 2020
@techknowlogick techknowlogick added this to the 1.12.0 milestone Feb 11, 2020
@codecov-io
Copy link

codecov-io commented Feb 11, 2020

Codecov Report

Merging #10237 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10237      +/-   ##
==========================================
+ Coverage   43.66%   43.67%   +<.01%     
==========================================
  Files         582      582              
  Lines       80047    80047              
==========================================
+ Hits        34955    34962       +7     
+ Misses      40756    40748       -8     
- Partials     4336     4337       +1
Impacted Files Coverage Δ
modules/indexer/stats/db.go 55.17% <0%> (-10.35%) ⬇️
services/pull/pull.go 32.43% <0%> (-1.51%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
models/error.go 30.95% <0%> (+0.54%) ⬆️
services/pull/patch.go 62.89% <0%> (+2.51%) ⬆️
services/pull/temp_repo.go 31.62% <0%> (+2.56%) ⬆️
services/pull/check.go 35.36% <0%> (+4.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79fb8f5...60c6956. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 11, 2020
Signed-off-by: jolheiser <[email protected]>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 11, 2020
web_src/js/utils.js Outdated Show resolved Hide resolved
web_src/js/index.js Outdated Show resolved Hide resolved
Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
@jolheiser
Copy link
Member Author

@silverwind Added suggestions.

@silverwind
Copy link
Member

silverwind commented Feb 11, 2020

Can you put suburl and staticPrefix on the window.config object in the page header template? I think it's easier that way and we don't need to pass it everywhere as arguments. You can then destructure it at the start of files like const {suburl, staticPrefix} = window.config (after the imports).

Here:

window.config = {

@jolheiser
Copy link
Member Author

jolheiser commented Feb 11, 2020

@silverwind Done, and good idea. 👍

EDIT: Didn't see the last edit, so right now it's not de-structured. Is that okay or should I change it?

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 11, 2020
@silverwind
Copy link
Member

silverwind commented Feb 11, 2020

Yes I'd prefer it destructured for conciseness. Can you also refactor to the original go variable names? Like

const { AppSubUrl, StaticUrlPrefix } = window.config;

Signed-off-by: jolheiser <[email protected]>
@jolheiser
Copy link
Member Author

jolheiser commented Feb 11, 2020

It seems the de-structure hasn't worked, as it is now undefined when I test locally.
After doing a hard reload it picked it up, ignore me.

@techknowlogick techknowlogick merged commit d67e9b9 into go-gitea:master Feb 12, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants