Commit Graph

269 Commits

Author SHA1 Message Date
silverwind afa781bf20
Dropzone styling improvements (#15291)
* Dropzone styling improvements

- Move all dropzone styles to separate file
- Fix white background in arc-green
- Fix rendering of non-square images and previews

* increase thumbnail quality, set contain in js, replace blur effect with opacity
2021-04-10 00:51:27 +08:00
silverwind d0c9b3e208
Branch page and misc css improvements (#15208)
- Improve branches page, increase icon size, use octicons, use css vars
- Style placeholder color via css var
- Slightly increase contrast of input fields and active/hover states
- Add styling for select boxes in arc-green
2021-04-03 10:37:32 +02:00
silverwind aee5ef0051
Diff box fixes (#15214)
- Fix misaligned "Show Outdated" buttons via flexbox
- Add hover effect to "Show Outdated" buttons
- Remove overreaching margin from selector .diff-file-box and handle
  cases individually.

Fixes: https://github.com/go-gitea/gitea/issues/15097

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-03-31 18:19:53 -04:00
silverwind cce006b857
Fix webhook delivery and issue checklist for arc-green (#15195)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-03-30 09:02:41 +03:00
KN4CK3R 0c6137617f
Add Tabular Diff for CSV files (#14661)
Implements request #14320 The rendering of CSV files does match the diff style.

* Moved CSV logic into base package.

* Added method to create a tabular diff.

* Added CSV compare context.

* Added CSV diff template.

* Use new table style in CSV markup.

* Added file size limit for CSV rendering.

* Display CSV parser errors in diff.

* Lazy read single file.

* Lazy read rows for full diff.

* Added unit tests for various CSV changes.
2021-03-29 22:44:28 +02:00
Lunny Xiao 8567cba0d9
Implement delete release attachments and update release attachments' name (#14130)
* Implement delete release attachment

* Add attachments on release edit page

* Fix bug

* Finish del release attachments

* Fix frontend lint

* Fix tests

* Support edit release attachments

* Added tests

* Remove the unnecessary parameter isCreate from UpdateReleaseOrCreatReleaseFromTag

* Rename UpdateReleaseOrCreatReleaseFromTag to UpdateRelease

* Fix middle align
2021-03-23 00:09:51 +08:00
silverwind d05539eb3e
Fix markdown rendering in milestone content (#15056)
- Add missing markdown class for rendered markdown.
- Increase font size of milestone name in list.

Fixes: https://github.com/go-gitea/gitea/issues/15046
2021-03-20 10:36:52 +01:00
Mike L 0e95a41ccd
Fix hover color for last row of repo file list (#15018) 2021-03-18 18:05:26 +00:00
Roger Luo 119d2cb6e4
Create new issue from code (#14863)
* Feat: add reference in new issue with permalink menu for code view.

* Fix: recover index.js file.

* Add comments and redo ci.

* Fix code convention

* Fix code.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
2021-03-17 22:02:38 -04:00
Mike L 5f8478ab0a
Fix repo page language stat span color (#14993)
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-03-14 22:27:58 +02:00
Mike L 9566c9f0c7
Re-enable listing of forks when logged out (#14992)
* Re-enable listing of forks when logged out

* Further improvements on repo button logic
2021-03-14 14:48:28 +00:00
Norwin f4ce10c6a3
Minor UI fixes (#14926)
* disable fork button when not signed in

* fix commit body styling on PR page

* fixup! fix commit body styling on PR page
2021-03-08 18:55:37 +01:00
Mike L 4172b1955f
Fix dashboard UI bugs and more (#14767)
This PR fixes a few UI bugs I spontaneously encountered:

- Fixes emojis in repo titles getting head-cut and tail-cut in dashboard feed due to introduction of 1.25 em emojis at 1 em line-height, by simply using the original 1 3/7 em value of `semantic.css`
- Fixes regression (too long repo names should be capped to 70%) in #13828 due to flex children not respecting properties like `overflow: hidden;`, and removes a block of dead style code
- Follow-up to #14761, removes extraneous code for top navbar and correct right margin for Font Awesome
- Fixes color emphasis inversion in arc-green theme for top right buttons (edit, delete) on commit view boxes
2021-02-25 13:35:43 +01:00
vnkmpf 441f3f0f20
Make fileheader sticky in diffs (#14616)
* Make fileheader sticky #12552

* Remove sticky filenames when width is 480px or less

On mobile phone sticky filename is hidden due to the combination
of many possible widths and lengths.

* Fix text color for .markdown-info

* Fix visual of sticky diff box on 480px or less

- Hide arrow for select buttons.
- Fix changes, additions and deletions.
With flexbox they look very broken.
This commit hides some words to, so the result is:
"123 changed files  987 additions  456 deletions"
- center text in buttons

Co-authored-by: zeripath <art27@cantab.net>
2021-02-11 19:28:51 +01:00
Roberto Santalla ef85bf84ee
Project: show referenced PRs in issue cards (#14183)
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-01-20 21:53:48 +02:00
Lauris BH ca63a9d3f1
Add edit, delete and reaction support to code review comments on issue page (#14339) 2021-01-17 19:29:10 +02:00
Cirno the Strongest 21fbee1503
Various UI fixes (#14239)
* Fix #14238

* Fix #14235

* Fix #14237

* Fix #14234

* Use octicon to show private status of repo in admin dashboard

* Fix #14232

* Fix #14236
2021-01-04 13:18:12 +01:00
Kyle D 0f99edf123
Prevent clipping input text in Chrome (#14179) 2021-01-01 14:05:40 -05:00
silverwind 8e5aea88c7
Improve label and text wrapping (#14113)
* Improve label wrapping

- Adjust issue list styles so labels can wrap on the same line as the
  text. This relies on `display: inline` with the HTML whitespace being
  used as the separator.
- Add global word-break: break-word. This should generally avoid text
  overflows in various places.

* add whitespace to history labels

* use overflow-wrap

* restore word-break rules

* use correct pre

* use better selector for middle align

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-12-29 18:48:28 -05:00
silverwind 50a2dd52ba
Update JS dependencies and webpack (#14118)
* Update JS dependencies

- Update all JS dependencies
- Adapt webpack config for version 5
- Update to Less 4.0, adapting usage of removed mixin syntax
- Enable new ESLint rules and fix discovered issues

* update license-webpack-plugin to fix missing licenses

* update license-webpack-plugin once more to get webpack into the license output

* switch to license-checker-webpack-plugin again for performance

* update deps again

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-12-27 15:24:27 +01:00
silverwind fe403725f4
Improve basic button and label styles (#14119)
* Improve disabled styles for repo buttons

- Simplify disabled styling of label by matching for the disabled
  attribute.
- Raise fomantic disabled opacity from .45 to .55 to for more contrast.
- Use CSS vars for basic button styles.

* restore clickability on label

* color tweaks and remove arc-green style

* slightly reduce button size

* consolidate vars

* also cover active class

* slightly more distinct active class

* remove useless rule
2020-12-27 18:53:53 +08:00
silverwind b4f8da533e
Search and Diff CSS enhancements (#14050)
* Search and Diff CSS enhancements

- Use flexbox for language stats
- Improve labels and code boxes on repo and code search
- Use flexbox on diff header and improve suppressed diff text
- Add dedicated color for diff expander

* more diff tweaks, less vertical padding on header

* more minor tweaks

* always show fold icon, image diff improvments

* remove margin

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-12-20 13:00:03 -05:00
Cirno the Strongest f3c4baa84b
Show dropdown with all statuses for commit (#13977)
* Show dropdown with all statuses for commit

* Use popups

* Remove unnecessary change

* Style popup

* Use divided list

* As per @silverwind

* Refactor GetLastCommitStatus

* Missing dropdown on repo home and commit page

* Fix tests

* Make status icon be a part of a link on PR list

* Fix missing translation call

* Indent fix

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-12-20 11:13:12 +08:00
silverwind e25e7b9598
Commit list display tweaks (#14043)
- Make plain <pre> inherit our monospace fonts, overriding fomantic's
  css reset which means expanded commit messages now follow the font
  settings.
- Adjust link styling and keyword highlighting in commit message
- Consolidate .commit-summary styles to single selector group

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-12-18 15:00:07 -05:00
silverwind 8af9df0036
Diff and code review refactors and improvements (#13922)
* Diff CSS refactors and misc tweaks

- Simplify Diff CSS styling
- Add color variables for diff
- Fix vertical centering of inline comment button
- Slightly adjust text colors, e.g. in comment header

* Code review improvments

* selector tweak

* fix diff issues, add inactive bg color

Co-authored-by: 6543 <6543@obermui.de>
2020-12-17 23:52:58 +08:00
Cirno the Strongest 27d0a5554f
Hide command line instructions when merge form is visible (#13956)
* Hide commandline instructions when merge form is visible

* As per @silverwind

Co-authored-by: zeripath <art27@cantab.net>
2020-12-15 01:09:24 -05:00
bobemoe b35c1b5784
add thumbnail preview section to issue attachments (#13826)
* add thumbnail preview section to attachments

* dont show thumbnail if the image is already shown inline

* update router to pass the `content` to the attachemnts template

* limit attachment preview height to 150px (same as width)

* remove unused css (referance removed in https://github.com/go-gitea/gitea/pull/11141/files#diff-9faae32445ed9673de2830c9fc35e93f44487f0a0068202988adaf00a5bac850L66 )

* dont show divider after edit if no attachemnts

Co-authored-by: James <inbox.dev@jhodges.co.uk>
Co-authored-by: 6543 <6543@obermui.de>
2020-12-13 21:12:27 +02:00
silverwind 1837e647eb
Diff stat improvements (#13954)
* Diff stat improvements

- Combine number to just total number of changes
- Add tooltip over stats bar
- Increase contrast on file name
- Refactor classes and CSS to be more reusable

* misc tweaks

* make count bold
2020-12-12 02:06:22 +01:00
silverwind e7938c9c44
Repo avatar fixes (#13891)
- Split up avatar rendering helpers for performance
- Fix showing repo SVG icon when no avatar is set
- Make repo SVG and avatar same size at 32px
- Fix fork line by adding vertical flexbox on repo title

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-12-07 23:14:28 -05:00
silverwind b7b5c3368d
Fix issue participants (#13893)
* Fix issue participants

* use list class for margin

* remove wrapper and don't render on zero participants

* keep whitespace

* remove participants class

* add some margin for timetracking stuff

Co-authored-by: 6543 <6543@obermui.de>
2020-12-07 22:20:12 -05:00
silverwind d0d59e3730
Font weight tweaks (#13854)
Font weight 500 is not discernible from 400 on some fonts/operating
systems so push them back to previous value 600 except for
fomantic-ui elements which stay at 500.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
2020-12-05 19:00:36 +08:00
silverwind 61d6c191d5
Improve migrate page and add card CSS (#13751)
- Use original gitea logo on migrate page
- Add card styles and map colors to css vars
- Tweak migrate page, adding hover effect to cards

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-12-05 12:09:09 +02:00
silverwind 9269a038a4
Direct avatar rendering (#13649)
* Direct avatar rendering

This adds new template helpers for avatar rendering which output image
elements with direct links to avatars which makes them cacheable by the
browsers.

This should be a major performance improvment for pages with many avatars.

* fix avatars of other user's profile pages

* fix top border on user avatar name

* uncircle avatars

* remove old incomplete avatar selector

* use title attribute for name and add it back on blame

* minor refactor

* tweak comments

* fix url path join and adjust test to new result

* dedupe functions
2020-12-03 19:46:11 +01:00
silverwind b1cf7f4df1
Add class to page content to unify top margin (#13766)
* Add class to page content to unify top margin

Previously pages would individually set this margin but some didn't so
content would stick to the header without any space. Resolve this by
adding a new class that is added on all pages. The only place where we
remove this margin again is on the pages with menu or wrapper in the
header.

* fix admin notices

* fix team pages

* fix loading segment on gitgraph for arc-green

* fix last missing case

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-30 23:00:14 -05:00
Cirno the Strongest d7ab72681d
Fix avatar offset on PR/issue timeline view (#13753)
* Fix avatar offset on PR/issue timeline view

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
2020-11-30 18:11:17 +02:00
silverwind 295fc99607
Markdown and Repo header tweaks (#13744)
* Markdown and Repo header tweaks

- Use CSS vars for all markdown colors
- Tweak repo header, removing double borders and adjust sizes
- Use menu instead of buttons for issue open/close switcher
- Add emoji inversion for select emoji glyphs in arc-green
- Use border over box-shadow for all buttons
- Add spacing element to login form without openid

* repo settings navbar fix

* use shared template in more places and adjust dashboard

* fix remaining open/close combos
2020-11-29 17:52:11 +02:00
silverwind e00a355427
Dropdowns, Labels fixes and more CSS tweaks (#13733)
* Dropdowns and Labels fixes

- Rework dropdown, menu and label styles
- Improve issue sidebar milestone and label sections
- Fix archived repo and private org badge
- Move more colors to CSS vars
- Move issue number to end of title on issue page

* more dropdown fixes

* fix basic blue labels - fixes #13731

* improve class setting on svg

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-29 01:22:04 -05:00
silverwind da4bb6fc4e
Fix label styles affecting shabox (#13734)
* Fix label styles affecting shabox

Add common parent .labels-list to issue labels lists to prevent
affecting other elements.

Fixes: https://github.com/go-gitea/gitea/issues/13704

* Update templates/shared/issuelist.tmpl

* Update templates/shared/issuelist.tmpl

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-11-28 22:26:03 -05:00
silverwind b2de034278
CSS navbar and color tweaks (#13609)
* CSS and color tweaks

- Unify navbar-style menus
- Fix admin bar overlapping menu bar
- Fixes file edit comment box
- Fix double border on review box
- Fix review timeline icons

* Many fixes to new-menu and navbar layout enhancements

* misc settings fixes

* navbar tweak

* fix pr tabs

* branch tag and arc color tweaks
2020-11-26 19:33:28 +00:00
silverwind 6d93a3ab18
Issue and Pulls lists rework (#13594)
* Issue and Pulls lists rework

Reorganized and restyled the issue and pull request lists.

* color and layout tweaks

* use new issue list on dashboard as well

* move pagination into template

* misc tweaks

* fix label hover

* fix milestone list

* fix discrepancies between issue and milestone list, add new 'merge' helper

* fmt

* simplify merge helper

* remove whitespace

* fix startIndex

* further simplify dict merging

* rename helper to 'mergeinto' for clarity

* allow bottom-row to wrap

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-25 13:20:40 +02:00
Cirno the Strongest 78204a7a71
Update _repository.less (#13672)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-23 11:42:24 +02:00
Norwin 75ebf7c5bd
fix media query edge case (#13546)
* fix media query edge case

was failing for 768px width before

* code review

* define responsive breakpoints as less variables

* add missing variables.less

* rename variables, drop screen constraints

* fix less import

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

* code review

altough it doesnt matter, LESS lazy evals variables

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-17 00:33:19 -05:00
silverwind b83825253e
Fix label display on new issues (#13590)
* Fix label display on new issues

PR #13570 broke label rendering for new issues and pulls because
missed the fact that the code was relying on the DOM elements being
toggled by JavaScript.

On top of that, the label rendering for new issues and pull was using
an outdated template which I consolidated in a new shared template.

* remove wrapper element and style tweaks

* style tweaks

* use shared template for whole label list

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-17 07:02:41 +02:00
silverwind 5bd05331ce
Fix comment triangles and tweak inline comment margins (#13554)
- Fix various miscolored comment bubble triangles
- Tweak padding on inline comment boxes
2020-11-16 21:53:04 +08:00
Dmitry Doroshev 22a8df3405
Add tab-size support for Firefox (#13576)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-15 20:08:43 -05:00
silverwind 0de546009e
CSS color variables, less bold font weight and more (#13567)
* CSS color variables, less bold font weight

- Define color variables for fully saturated colors and apply them where
  it made sense
- Add background color helper classes
- Globally reduce bold font weight from 700 to 500
- Remove border from timeline icons
- Unify dropzone styling
- Various border style consolidations

* attempt to fix test

* another attempt at tests

* fix contains
2020-11-15 15:58:16 -05:00
silverwind 50cbb20481
Fix issue label rendering (#13570)
* Fix issue label rendering

Prevent rendering of inactive labels and make them wrap inline.

Fixes: https://github.com/go-gitea/gitea/issues/13566

* also don't render the placeholder

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-15 13:11:58 -05:00
silverwind 5c76c5ce44
Fix issue label spacing and hover (#13553)
Fixes: https://github.com/go-gitea/gitea/issues/13545
Regressed by: https://github.com/go-gitea/gitea/pull/13458
2020-11-13 20:16:46 -05:00
silverwind 0ae35c66f2
Various style fixes (#13534)
* Various style fixes

- Fix the rest of the monochrome borders for arc-green
- Fix close icon position on system notice modal and padding
- Fix selectable table color for arc-green

* proper fix for close icon

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-13 09:31:25 +08:00
silverwind 21d496364a
Fix tooltips and issue dependency styles (#13458)
- Convert all tooltips to JS-based ones, fixing overflow issues
- Restyle issue dependencies/dependants
- Move popup styles to base style
- CSS Helper tweaks
- Unify pseudo element selectors and lint for it

Fixes: https://github.com/go-gitea/gitea/issues/13400
2020-11-10 20:28:07 +02:00
Cirno the Strongest 40c4466641
Fix broken .comment > .content caused by #13457 (#13482)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-09 20:43:08 -05:00
zeripath c05a8abc76
Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766)
* Multiple GitGraph improvements.

Add backend support for excluding PRs, selecting branches and files.

Fix #10327

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Only show refs in dropdown we display on the graph

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* use flexbox for ui header

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Move Hide Pull Request button to the dropdown

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add SHA and user pictures

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test 2

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixes

* async

* more tweaks

* use tabs in tmpl

Signed-off-by: Andrew Thornton <art27@cantab.net>

* remove commented thing

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix linting

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update web_src/js/features/gitgraph.js

Co-authored-by: silverwind <me@silverwind.io>

* graph tweaks

* more tweaks

* add title

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix loading indicator z-index and position

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-08 12:21:54 -05:00
silverwind 8411cb567a
Fix colors and triangles in issues (#13463)
- Fix misaligned triangles
- Fix triangle and header background colors
- Adjust timeline color
2020-11-08 16:29:18 +00:00
Cirno the Strongest f719e2e806
Fix double border introduced by #13434 (#13457)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2020-11-07 18:15:09 -05:00
silverwind eba0ac5bf6
Rework focused comment styling (#13434)
Had to tweak a few borders to make it work properly in all cases, also
added .comment-body class to specifically target that body.
2020-11-05 21:34:04 +02:00
silverwind 62719cdd2d
Fix whitespace rendering in diff (#13415)
- Introduce new .code-inner class that sets the CSS attributes on
rendered code lines like view,blame and diff.
- Rename .wrap class to .word-break to reflect what it actually does
- Remove .raw which was only used on webhook page
- Set white-space: pre-wrap except on blame where it can break the
layout

Fixes: https://github.com/go-gitea/gitea/issues/13406
2020-11-04 09:14:07 +02:00
a1012112796 b687707014
Add the tag list page to the release page (#12096)
* Add the tag list page to the release page

* Add the tags list view
* Add the delete tag way on ui
* Not delete tag and clear message when delete a release

Signed-off-by: a1012112796 <1012112796@qq.com>

* Apply suggestions from code review

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

* fix ui

* Add to header

* ui

* permission

* ui

* Update options/locale/locale_en-US.ini

Co-authored-by: Lauris BH <lauris@nix.lv>

* tweaks

* monospace commit hashes

* Add read permission check

* fix permission

* fix nit

* Update web_src/less/_base.less

Co-authored-by: silverwind <me@silverwind.io>

* ui fixes

* title tweaks

* fix lint

* fix test

* fix test and some ui nits

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
2020-11-02 18:10:22 -05:00
silverwind 4617bb689b
Misc UI fixes, add secondary color (#13378)
* Misc UI fixes, add secondary color

- Add secondary color, primarily used in arc-green currently
- Convert icons on release page to SVG
- Improve resolved conversation placeholder
- Diff fixes on arc-green
- Misc color tweaks

* fix comment header, adjust arc-green dropzone

* label margin, sidebar margin

* flexbox commits table and add primary button styles

* tooltip styles

* file header fixes

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
2020-11-01 15:04:26 -05:00
silverwind 2ac112d84e
Comment box tweaks and SVG dropdown triangles (#13376)
* Comment box tweaks and SVG dropdown triangles

- Change all dropdown triangles to SVG
- Bring inline review comment box closer to regular comment boxes
- Enhance arc-green checkbox contrast
- Minor reaction tweaks
- Flexbox the diff file header

* remove a border

* fix type marker in arc-green

* add small code padding

* fix position regression and remove useless rules

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-31 18:15:11 -04:00
silverwind 0e6bf7e4c9
Comment Header fixes (#13356)
Apply more flexboxes on comment header and remove float hacks. Needs
1.13 backport.

Fixes: https://github.com/go-gitea/gitea/issues/13316

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-10-31 15:17:52 +02:00
silverwind de871f7c93
Various style fixes (#13372)
- Add alpha variants for primary color
- Make timeline items solid background color
- Fix reaction styles recently regressed
- Fix diff header and make it flexbox
- Numerous smaller fixes for arc green
2020-10-31 14:17:32 +02:00
silverwind 6c323678d0
Use CSS Vars for primary color (#13361)
* Use CSS Vars for primary color

- Create 15 color shades derived from primary color
- Change blue-ish colors to use that primary color
- Move styles for scrollbars, selection from arc-green to base
- Remove obsolete arc-green styles that now use those variables

* simplify webkit scrollbar style

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-30 23:52:10 -04:00
silverwind c5020cff3d
Various UI and arc-green fixes (#13291)
- introduce variable for border-radius value
- fix some white borders in arc-green
- add text selection and placeholder in arc-green
- tweak branch list footer
- more things I forgot

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2020-10-24 15:15:29 -04:00
kolaente f24392391e
Fix PR/Issue titles on mobile (#13292)
* Start fixing Issue & PR title on mobile

Signed-off-by: kolaente <k@knt.li>

* Make sure the save & cancel buttons float right

Signed-off-by: kolaente <k@knt.li>

* Fix edit buttons and title input on mobile

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-10-24 19:48:08 +03:00
Iván Valdés 819901b3e9
Update outdated label to use Fomantic UI style (#13181)
* Update outdated label to use Fomantic UI style

* Use native labels rather than custom style

* Remove leading zero

Co-authored-by: zeripath <art27@cantab.net>
2020-10-21 19:47:16 -04:00
silverwind 3ddf3f93d6
Use CSS Variables for fonts, remove postcss-loader (#13204)
* Use CSS Variables for fonts, remove postcss-loader

- Use CSS variables for fonts, making the fonts easier to customize
- Remove postcss-loader, it's not doing anything useful and is actually
  applying strange transforms on our CSS.

Fixes: https://github.com/go-gitea/gitea/issues/11045

* introduce helper variable, mark documented vars

* work around case issue by always quoting specific fonts
2020-10-19 16:01:06 -04:00
silverwind 06eaf74e8a
Fix size and clickable area on file table back link (#13205)
Fixes: https://github.com/go-gitea/gitea/issues/13038

Should backport to 1.13.
2020-10-19 00:59:18 +03:00
Iván Valdés 05c7e58742
Show outdated comments in pull request (#13148)
Co-authored-by: zeripath <art27@cantab.net>
2020-10-15 11:17:48 +03:00
赵智超 8be3e439c2
Add team support for review request (#12039)
Add team support for review request

Block #11355

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2020-10-12 20:55:13 +01:00
kolaente b5e76dddb8
Fix Pull Request merge buttons on mobile (#13035)
Signed-off-by: kolaente <k@knt.li>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-05 19:31:25 -04:00
kolaente 78aded1eaa
Fix Issue & Pull Request comment headers on mobile (#13039)
Signed-off-by: kolaente <k@knt.li>
2020-10-05 18:46:11 -04:00
zeripath 5460bf8903
Fix formatting of branches ahead-behind on narrow windows (#12989)
Make the bar-groups width 50% with max-width of 90px

Fix #12252

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-02 19:10:43 -04:00
Victor ffa7dd6880
Changed width of signature avatar from auto to 16px (#12961)
Signed-off-by: Victor Roest <victor@xirion.net>

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-09-28 16:39:22 -04:00
Lunny Xiao e153cf07c3
Add a migrate service type switch page (#12697)
* Add a migrat service type switch page

* Improve translations

* remove images

* Fix images

* remove extra create repo button on dashboard

* Follow reviewers' opinions

* Fix frontend lint

* Remove wrong submit file

* Fix tests

* Adjust the size of image

* Apply suggestions from code review

Co-authored-by: 赵智超 <1012112796@qq.com>

* Remove username and password from migration of github/gitlab

* Improve docs

* Improve interface docs

Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-09 14:29:10 -04:00
silverwind 3865ecbf13
File header tweaks, add CSS helpers (#12635)
- replace two instances of fontawesome with octicons
- add new "class" optional argument to "svg" helper
- add many new CSS helpers and move their import to the end for
  increaseed precedence

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-08 13:17:56 -04:00
Mike L 1fe909757c
Apply #12576 to top right reaction picker (#12623)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-28 13:39:41 -04:00
silverwind f8601f3f09
Fix ellipsis in files table (#12617)
Turns out text ellispsis does not work in combination with flexbox and
while wrapping in a display:block can help in some cases, I could not
get this to work properly so this changes the truncate to inline-block
again and reduces the clickable area to just vertical expansion from the
links.
2020-08-27 21:45:37 +01:00
silverwind 7d14d6c1c1
Fix file table overflows (#12603)
- Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553.
- Fix submodule columns stretching the table
- Refactor template to share more HTML nodes
- Introduce CSS helper classes

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-26 11:52:44 -04:00
silverwind eb4db0445b
Reindent Less to 2-space (#12602)
Reindent and unify codebase to 2-space indentation.
2020-08-25 22:48:53 +03:00
silverwind 0c0f049d09
Reaction picker display improvements (#12576)
- Remove overly thin font-width on counter
- Add hover effect on reaction picker
- Change colors on arc-green to green to match the theme

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-08-23 18:45:21 -04:00
silverwind dd8ec12188
Increase clickable area on files table links (#12553) 2020-08-23 20:05:17 +01:00
zeripath 1701d57fb2
Set z-index for sticky diff box lower (#12537)
Fix #12525

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-08-19 13:37:57 -05:00
Lanre Adelowo 4027c5dd7c
Kanban board (#8346)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
Co-authored-by: Kerry <flatline-studios@users.noreply.github.com>
Co-authored-by: Jaqra <jaqra@hotmail.com>
Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com>
Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com>
Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-16 23:07:38 -04:00
silverwind 0dfbef5f70
Actually fix image diff padding/border (#12381)
https://github.com/go-gitea/gitea/pull/12346 was using the wrong
selector which affected only the single image view. Use the correct
selector for image diffs. Removal of border-radius is still worth to
keep to override the global 3px on <img>.

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-08-06 12:41:45 -04:00
zeripath 2c1ae6c82d
Render the git graph on the server (#12333)
Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation.

* This implementation provides a 16 limited color selection
* The uniqued color numbers are also provided
* And there is also a monochrome version
*In addition is a hover highlight that allows users to highlight commits on the same flow.

Closes #12209

Signed-off-by: Andrew Thornton art27@cantab.net
Co-authored-by: silverwind <me@silverwind.io>
2020-08-06 09:04:08 +01:00
silverwind cd7f1fd72b
Remove padding/border-radius on image diffs (#12346) 2020-07-28 16:48:48 +01:00
silverwind 8baf5ca228
Reduce emoji size (#12317)
* Reduce emoji size

Rendering should now pretty much match GitHub with 1.25em. I verified
that emojis don't increase the line height and removed unecessary size
overrides because now all emojis should appear similar in relation to
the font size.

* fix reaction hover
2020-07-25 12:55:34 +03:00
silverwind 0e24af6951
Update Octicons to v10 (#12240)
* Update Octicons to v10

Besides a few renames, these icons are no longer present in v10 that we've
used, so had to change:

file-symlink-directory -> file-submodule
internal-repo -> repo
repo-force-push -> repo-push
repo-template-private -> repo-template

Fixes: https://github.com/go-gitea/gitea/issues/11889
Ref: https://github.com/primer/octicons/releases/tag/v10.0.0

* add custom sliders svg for removed octicon-settings

* apply suggestion

* fix triangles and use play on admin dashboard

* add custom mirror svg

* add missing build files

* unify custom svgs

* move to octicon-repo-clone to gitea-mirror

* use octicon-x on conflicts

* tweak timeline icons

* tweak comment buttons

* update settings icon to octicons v1

* switch to octicon-mirror and octicon-tools

* replace two wiki buttons with octicons

* remove whitespace in svg sources

* Fix filepath basename on Windows for SVG bindata (#12241)

* move octicons to devDependencies

* move back to dependencies

* move svgo to devDependencies again

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-17 18:15:12 +03:00
silverwind 84a419de98
Replace code fold icons with octicons (#12222)
- replace font-awesome icons with octicons
- clean up js and css surrounding the code expansion and file folding
- fix hover color on arc-green
- tweak diff line number colors

Co-authored-by: zeripath <art27@cantab.net>
2020-07-13 16:21:19 +03:00
Cirno the Strongest 88ef04dbe9
Adjust margin-top for repo header label (#12174) 2020-07-07 19:47:18 +08:00
zeripath 2ab185d3ab
Rewrite GitGraph.js (#12137)
The current vendored gitgraph.js is no longer maintained and is
difficult to understand, fix and maintain.

This PR completely rewrites its logic - hopefully in a clearer fashion
and easier to maintain.

It also includes @silverwind's improvements of coloring the commit dots
and preventing the flash of incorrect content.

Further changes to contemplate in future will be abstracting out of the
flows to an object, storing the involved commit references on the flows
etc. However, this is probably a required step for this.

Replaces #12131
Fixes #11981 (part 3)

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-07-05 02:04:24 +01:00
zeripath 482ba937ed
Provide option to unlink a fork (#11858)
* Provide option to unlink a fork

Fix #4566

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>

* Add check that user can create repo

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @cirnoT

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-07-02 15:09:09 +01:00
mrsdizzie af7ffaa279
Server-side syntax highlighting for all code (#12047)
* Server-side syntax hilighting for all code

This PR does a few things:

* Remove all traces of highlight.js
* Use chroma library to provide fast syntax hilighting directly on the server
* Provide syntax hilighting for diffs
* Re-style both unified and split diffs views
* Add custom syntax hilighting styling for both regular and arc-green

Fixes #7729
Fixes #10157
Fixes #11825
Fixes #7728
Fixes #3872
Fixes #3682

And perhaps gets closer to #9553

* fix line marker

* fix repo search

* Fix single line select

* properly load settings

* npm uninstall highlight.js

* review suggestion

* code review

* forgot to call function

* fix test

* Apply suggestions from code review

suggestions from @silverwind thanks

Co-authored-by: silverwind <me@silverwind.io>

* code review

* copy/paste error

* Use const for highlight size limit

* Update web_src/less/_repository.less

Co-authored-by: Lauris BH <lauris@nix.lv>

* update size limit to 1MB and other styling tweaks

* fix highlighting for certain diff sections

* fix test

* add worker back as suggested

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-01 00:34:03 +03:00
Lauris BH ce5f2b9845
Fix commit icon position (#12087) 2020-06-29 23:53:30 -04:00
Cirno the Strongest b918609acc
Use custom SVGs for commit signing lock icon (#12017)
* Use custom SVGs for commit signing lock icon

* missing spans

* editorconfig

* xmlns and remove aria-hidden

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-28 00:05:50 -04:00
Cirno the Strongest 0ea479561d
Add org avatar on top of internal repo icon (#11895)
* Add org avatar on top of internal repo icon

* add color for arc-green

* use wrapper div to avoid negative margins

* rename class and move div

* move div to icon tmpl

* remove unnecessary margin for lock octicon

* fix label align together with #11891

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-26 03:07:15 +03:00
Cirno the Strongest 6764daf7e5
Use Fomantic's fluid padded for blame full width (#12023)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-25 14:58:12 -04:00
Cirno the Strongest daf62841f6
Fix sticky diff stats container (#12002)
* Fix sticky diff stats container

* Use pure CSS sticky instead of Fomantic's JS

* add border color to arc-green

* add slight padding on sides

* make linter happy

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-22 15:02:27 -04:00
silverwind b948ecb2d2
Make tabs smaller (#12003)
* Make tabs smaller

Fomantic's tabs are excessively wide and with another tab added on the
repo tabbar (https://github.com/go-gitea/gitea/pull/8346) it would break
the layout on the english language.

Globally reduce tab bar padding to around half of the previous values.

* disable no-duplicate-selectors linter rule

* more tab bar tweaks

* more tweaks

* merge rules and nesting

* remove arc-green weird hover color

* few more arc-green tweaks

* restore to 12px

* tweaks

* use half width height padding

* final tweak

* 10px

* remove min-height

* 11px

* remve new-menu background on light theme too

* background fixes for new-menu

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-22 19:44:06 +03:00
Cirno the Strongest c1a2887c02
Use octicons for all repo header buttons (#11890)
* Use octicons for all repo header buttons

* ensure margin isn't set on any other svg outside repo buttons

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-22 02:18:42 +03:00
Cirno the Strongest 6c81b738f7
Update Fomantic-UI to 2.8.6 and remove old workarounds (#11933)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-17 21:20:07 -04:00
Cirno the Strongest 492b7d6357
Fix alignment for show/hide outdated link on resolved conversation (#11881)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 15:50:12 -04:00
Cirno the Strongest c8780984f8
Rework blame template and styling (#11885)
* Rework blame template and styling

* cleanup template and add missing NumLines

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 14:39:39 -04:00
Cirno the Strongest 26cb7e4b39
Vertically align review icons on repository sidebar (#11880)
* Vertically align review icons on repository sidebar

* Update web_src/less/_repository.less

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 13:26:10 -04:00
Cirno the Strongest 5f47835f4c
Better align items using flex within review request box (#11879)
* Better align items using flex within review request box

* use justify-content

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 03:37:00 -04:00
赵智超 48842ed108
ui: Show update branch item in merge box when it's necessary (#11761)
* ui: Show update branch item in merge box when it's necessary

As title, should show it without care about whether
this pr can be merged.

fix #10959

Signed-off-by: a1012112796 <1012112796@qq.com>

* fix ui

* Fix ui, thanks to @silverwind.

Co-authored-by: silverwind <me@silverwind.io>

* fix lint

* Update templates/repo/issue/view_content/pull.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Apply review suggestion

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-13 14:49:59 -04:00
silverwind 628ee1d82e
Replace jquery-datetimepicker with native date input (#11684)
This removes the jQuery plugin as well as the associated config options.
Native input[type=date] does not require a language attribute as it is
localized by default, except for the placeholder attribute for which I
currently piggy-back the repo.issues.due_date_form localization option.

Implementation should pretty much match GH. Of note is that Safari does
not provide a UI for this input type, but I don't think providing one is
neccessary and GH did not bother either.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 14:35:27 -04:00
John Olheiser aaff47ad75
Fix reply octicon (#11821)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-06-09 10:13:00 -05:00
Cirno the Strongest f6315fb477
Fix align issues and decrease avatar size on PR timeline (#11689)
* Fix margin for referenced issue title

* Change avatar size to 20px, align referenced issue title to avatar

* better align
2020-06-06 21:30:10 +01:00
Cirno the Strongest 8e035f81c0
Fix styling for commiter on diff view (#11715)
* Fix styling for commiter on diff view

* Update options/locale/locale_en-US.ini

* Update templates/repo/commit_page.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Update templates/repo/commit_page.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-02 22:40:08 -04:00
Cirno the Strongest d0a18a1270
Show full GPG commit status on PR commit history (#11702)
* Show full GPG commit status on PR commit history

* move shabox badge to separate template

* unnecessary $

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-02 20:22:26 -04:00
Cirno the Strongest b97917a6e7
Apply padding to approval icons on PR list (#11622)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2020-05-26 00:48:23 -04:00
Cirno the Strongest 793719a50d
Fix missing styling for shabox on PR commit history (#11625) 2020-05-26 04:49:53 +01:00
Cirno the Strongest 75739d00cb
Fix styling for PR merge section when no checks (#11609)
Makes styling consistent between two cases. Also removed unnecessary double border.
2020-05-25 20:08:06 +01:00
Cirno the Strongest f2a0be1683
Fix margin on PR form (#11566) 2020-05-25 11:04:02 +01:00
Cirno the Strongest 04afd9d1e2
Fix inconsistent font size for markdown preview on new PR view (#11565)
We use same method for new issue form and issue view, but was missing from new PR view making it one place where markdown preview is inconsistent in font size.
2020-05-24 18:53:37 +01:00
Cirno the Strongest 8d9f9c3237
Add missing padding for multi-commit list on PR view (#11593) 2020-05-24 06:54:18 +01:00
Cirno the Strongest ac3c467770
Fix styling and padding for commit list on PR view (#11588)
* Fix styling and padding for commit list on PR view

* fix bold on author
2020-05-24 01:05:20 +03:00
Cirno the Strongest c7c61778bc
Fix text-transform on wiki revisions page (#11486)
* Fix text-transform on wiki revisions page

* apply global

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2020-05-20 16:27:14 -04:00
Cirno the Strongest ee4e8542c7
Fix margin for branch-update grid on PR view when update button is not present (#11521)
* Fix margin for branch-update grid on PR view when update button is not present

* Move padding to row element

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-20 13:12:08 -04:00
赵智超 0903b1ac8c
Add push commits history comment on PR time-line (#11167)
* Add push commits history comment on PR time-line
* Add notify by email and ui of this comment type also

Signed-off-by: a1012112796 <1012112796@qq.com>

* Add migrations for IsForcePush
* fix wrong force-push judgement
* Apply suggestions from code review
* Remove commit number check
* add own notify fun
* fix some typo

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* fix lint

* fix style again, I forgot something before

* Change email notify way

* fix api

* add number check if It's force-push

* Add repo commit link fuction
remove unnecessary check
skip show push commits comment which not have commits alive

* Update issue_comment.go

* Apply suggestions from code review

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Apply suggestions from code review

* fix ui view

Co-authored-by: silverwind <me@silverwind.io>

* fix height

* remove unnecessary style define

* simplify GetBranchName

* Apply suggestions from code review

* save commit ids and isForce push by json
* simplify GetBranchName

* fix bug

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
2020-05-20 09:47:24 -03:00
silverwind 9e0e2a9fcf
Enable stylelint's shorthand-property-no-redundant-values (#11436)
Enabled the rule and --fix'ed issues.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-20 00:06:04 -04:00
silverwind 50a97272b9
Tweak reaction buttons (#11496)
- Vertical centering using flexbox
- Very slightly decreased size of the boxes

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-19 03:17:37 -04:00
Cirno the Strongest e7e0097148
Fix footer padding for comment code reply form on issue event view (#11469) 2020-05-18 06:33:47 +01:00
L0veSunshine 9cc9e47158
[UI] Adjust CSS details for adding emoticons (#11435)
* Adjust CSS details for added emoticons

* fix lint

* avoid git conflict
2020-05-17 00:06:34 +03:00
Cirno the Strongest 4744e1e0f7
Fix buttons left-margin (#11427)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-16 20:45:44 +03:00
Sorien 1982194dc5
Prettify timeline 3 (#11139)
* Fix timeline comments sections borders

* Fix files dropzone right alignment

* Update review comment form and controls

* Clear segment style from comment form tabs

* Remove segment class from pulls tab

* Fix Time Tracker - Add Time button border

* Fix buttons right alignment

* Markdown tab minimal height

* Fix DropZone hover effect

* Fix Lint + remove unused controls class

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-05-14 15:15:21 -04:00
silverwind 9249c810b8
Switch code editor to Monaco (#11366)
* Switch code editor to Monaco

This switches out CodeMirror for Monaco which is based on the same code
base as VS code and should work pretty similar to it.

It does add a few async chunks, totalling around 10MB to our build. It
currently supports around 65 languages and in the default configuration,
each language would emit one ugly [number].js chunk, so I opted to
combine them all into a single file for now.

CodeMirror is still being used under the hood by SimpleMDE so it can not
be removed yet.

* inline editorconfig, fix diff, use for markdown, remove more dead code

* refactors, remove jquery usage

* use tab_width

* fix intellisense

* rename function for clarity

* misc tweaks, enable webpack progress display

* only use --progress on dev build

* remove useless borders in arc-green

* fix typo

* remove obsolete comment

* small refactor

* fix file creation and various refactors

* unset useTabStops too when no editorconfig

* small refactor

* disable webpack's [big] warnings

* remove useless await

* fix dark theme check

* rename chunk to 'monaco'

* add to .gitignore and delete webpack dest before build

* increase editor height

* support more editorconfig properties

* remove empty element filter

* rename

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2020-05-14 19:06:01 +03:00
mrsdizzie 4563eb873d
Support unicode emojis and remove emojify.js (#11032)
* Support unicode emojis and remove emojify.js

This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (😄)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: https://github.com/go-gitea/gitea/issues/9182
Fixes: https://github.com/go-gitea/gitea/issues/8974
Fixes: https://github.com/go-gitea/gitea/issues/8953
Fixes: https://github.com/go-gitea/gitea/issues/6628
Fixes: https://github.com/go-gitea/gitea/issues/5130

* add new shared function emojiHTML

* don't increase emoji size in issue title

* Update templates/repo/issue/view_content/add_reaction.tmpl

Co-Authored-By: 6543 <6543@obermui.de>

* Support for emoji rendering in various templates

* Render code and review comments as they should be

* Better way to handle mail subjects

* insert unicode from tribute selection

* Add template helper for plain text when needed

* Use existing replace function I forgot about

* Don't include emoji greater than Unicode Version 12

Only include emoji and aliases in JSON

* Update build/generate-emoji.go

* Tweak regex slightly to really match everything including random invisible characters. Run tests for every emoji we have

* final updates

* code review

* code review

* hard code gitea custom emoji to match previous behavior

* Update .eslintrc

Co-Authored-By: silverwind <me@silverwind.io>

* disable preempt

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-28 15:05:39 -03:00
Sorien 0ef11ff2c9
consolidate author name across timeline (#11053)
* consolidate author name across timeline

* Sync with master

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-19 03:15:07 +03:00
CirnoT 8cdb6662c8
Align review-item svg octicons (#11065) 2020-04-15 15:41:55 -03:00
Sorien c97e988380
Prettify Timeline (#10972)
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
2020-04-11 01:01:41 +03:00
L0veSunshine 08208cdfb8
Fix forked repo has no icon and language stat. (#10791)
* Update header.tmpl

* Update _repository.less

* Update pull.go

* Update indexer.go

* Update pull.go

* Update pull.go

* Update indexer.go

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

Thanks the advice from lunny and 6543.

* fix forked repo doesn't have language stat

Modified as suggested by 6543.

* fix forked repo doesn't have language stat

simplify the function.

* fix forked repo doesn't have language stat

update the indexer after the loop

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-08 15:13:04 +03:00
silverwind 6cf71ee0e8
Fix scrollbar issues in dropdowns (#10897)
* Fix scrollbar issues in dropdowns

Fixes: https://github.com/go-gitea/gitea/pull/10835

* remove wrapping

* grammar

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-04 18:29:15 -03:00
mrsdizzie 8d99ee2773
Add Organization Wide Labels (#10814)
* Add organization wide labels

Implement organization wide labels similar to organization wide
webhooks. This lets you create individual labels for organizations that can be used
for all repos under that organization (so being able to reuse the same
label across multiple repos).

This makes it possible for small organizations with many repos to use
labels effectively.

Fixes #7406

* Add migration

* remove comments

* fix tests

* Update options/locale/locale_en-US.ini

Removed unused translation string

* show org labels in issue search label filter

* Use more clear var name

* rename migration after merge from master

* comment typo

* update migration again after rebase with master

* check for orgID <=0 per guillep2k review

* fmt

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* remove unused code

* Make sure RepoID is 0 when searching orgID per code review

* more changes/code review requests

* More descriptive translation var per code review

* func description/delete comment when issue label deleted instead of hiding it

* remove comment

* only use issues in that repo when calculating number of open issues for org label on repo label page

* Add integration test for IssuesSearch API with labels

* remove unused function

* Update models/issue_label.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Use subquery in GetLabelIDsInReposByNames

* Fix tests to use correct orgID

* fix more tests

* IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well

* update comment for clarity

* Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition

* Don't sort repos by date in IssuesSearch API

After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures:

SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45

Returns different results for MySQL than other engines. However, the similar query:

SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30

Returns the same results.

This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function.

* linter is back!

* code review

* remove now unused option

* Fix newline at end of files

* more unused code

* update to master

* check for matching ids before query

* Update models/issue_label.go

Co-Authored-By: 6543 <6543@obermui.de>

* Update models/issue_label.go

* update comments

* Update routers/org/setting.go

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 01:14:46 -03:00
silverwind b1c331c845
Fix repo summary height (#10825)
Extracted the style that keeps the animation of the language bar in
check.

Fixes: https://github.com/go-gitea/gitea/issues/10754

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-03-25 22:58:25 +00:00
Lauris BH e5a008f7b2
Add nowrap to language bar items (#10755) 2020-03-20 10:10:02 +08:00
6543 57c7a7aa72
Ensure Update button is enabled even when CI has failed (#10640)
* ignore pull status

* fix css

* fix css
2020-03-07 03:24:42 +02:00
silverwind e0ecddc11b
Prevent accidential selection of language stats bar (#10537) 2020-02-29 00:59:29 +08:00
zeripath 90919bb37e
Show Signer in commit lists and add basic trust (#10425)
* Show Signer in commit lists and add basic trust

Show the avatar of the signer in the commit list pages as we do not
enforce that the signer is an author or committer. This makes it
clearer who has signed the commit.

Also display commits signed by non-members differently from
members and in particular make it clear when a non-member signer
is different from the committer to help reduce the risk of
spoofing.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* ensure orange text and background is available

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update gpg_key.go

* Update models/gpg_key.go

* Apply suggestions from code review

* Require team collaborators to have access to UnitTypeCode

* as per @6543

* fix position of sha as per @silverwind

* as per @guillep2k
2020-02-27 16:20:55 -03:00
silverwind ef798d4b84
Tweak language stats bar (#10487)
- Ensure bar does not overflow parent
- Remove unneccessary borders/background
- Fix shaky animation caused by JS animation miscalculation by setting
  fixed height on the summary box. Box itself is still shaky during
  animation, but better it then the whole page.

Fixes: https://github.com/go-gitea/gitea/issues/10474
2020-02-26 22:44:14 +02:00
silverwind 4e912d2ed8
Disallow leading zeroes in Less (#10407) 2020-02-23 13:48:27 -03:00
zeripath c8d1c38129
Render READMEs in docs/ .gitea or .github from root (#10361)
* Render READMEs in docs/ .gitea or .github from root
2020-02-21 17:04:20 -06:00
John Olheiser ac18c3f6f2
Fixes (#10386)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-20 17:44:13 -06:00
Lauris BH 3c45cf8494
Add detected file language to code search (#10256)
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00
zeripath 314740e215
Truncate long commit message header (#10301)
* Truncate long commit message header

* Fix overflow in view commit table

* Use @media less

* Further improvements

* Fix the commit message on small screens

* adjust width of minimal table
2020-02-17 19:45:55 +02:00
John Olheiser d67e9b9629
SVG Octicon fixes (#10237)
* SVG fixes

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Colorize span->svg only

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* @silverwind suggestions

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Alphabetical

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Convert suburl and staticPrefix to window.config

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* De-structure

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-11 20:53:18 -05:00
jaqra 6c823c7560
fix filter label emoji width (#10241) 2020-02-11 22:25:41 +01:00
James Lakin 54af3c90c7
Fix issue sidebar menus having an infinite height (#10239)
* Revert "Limit label list height on edit issue page"

* Fix issue sidebar menus having an infinite height
2020-02-11 22:40:47 +02:00
John Olheiser 86fdba177a
Add Octicon SVG spritemap (#10107)
* Add octicon SVG sprite

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Static prefix

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* SVG for all repo icons

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* make vendor

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Swap out octicons

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move octicons to top of less imports

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix JS

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Definitely not a search/replace

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Missed regex

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move to more generic calls and webpack

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* make svg -> make webpack

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove svg-sprite

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Missed a test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove svg from makefile

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Suggestions

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Attempt to fix test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Revert timetracking test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Swap .octicon for .svg in less

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add aria-hidden

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Replace mega-octicon

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix webpack globbing on Windows

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Revert

Co-Authored-By: silverwind <me@silverwind.io>

* Fix octions from upstream

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix Vue and missed JS function

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add JS helper and PWA

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Preload SVG

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-11 12:02:41 -05:00