Add `Poll` model and `CreatePoll` function.
The poll is ineffective, no one can vote. (yet)
Add `Judgment` creation and update.
There can be at most one judgment per trio of poll, judge and candidate.
Each Judge may emit one Judgment per Candidate of a Poll.
Mop up and oust a reminiscent bug.
Add the Poll Create, Update and Delete forms and logic.
We can't tally a Poll yet.
Nor can we judge issues.
Add the Judgment forms for each Poll of each issue.
Everything works so far without javascript.
We added CSS like monkeys, until we figure out what to do with it.
Use emotes Chromium can print as well.
Fix some warnings.
Prepare for the far future.
Add scoring pseudo-code for fast deliberation.
This was entertaining, but it's perhaps wrong,
although we can't find any reason why so far.
We contacted the world's top specialist on the matter.
…
Three gods, A, B, and C are called,
in no particular order, True, False, and Random.
True always speaks truly, False always speaks falsely,
but whether Random speaks truly or falsely is a
completely random matter.
Your task is to determine the identities of A, B, and C
by asking three yes-no questions; each question
must be put to exactly one god. The gods understand
English, but will answer all questions in
their own language, in which the words for yes
and no are da and ja, in some order.
You do not know which word means which.
Add a naive tallier.
I wish I had a feature suite in Gherkin here…
Add some tests to the deliberator and implement them.
Still waiting for input from the specialist(s)
before delving into implementation details.
Use unsigned integers where it makes sense.
(or not)
Provision more tests for the deliberator.
We've got some answers — still confused, though.
Implement a very naive deliberator.
Fix a fix for the label's hover area.
Let's barf as little as possible on existing CSS.
Fill the missing judgments as REJECT judgments.
This should be optional.
Add a battery of tests to GetMedian
We're now going to be able to implement it properly,
not like the cheap cheat we had so far.
Adapt label color to median grade.
This is a cheap implementation that will probably need a rewrite
for complete support of other gradations.
Add more tests to expose the limitations of the current scoring implementation.
Now we can work some more on the scoring.
Implement a less naive score calculus.
So far it holds.
The score is a bit long (90chars = 15 chars per possible grade)
but it won't get any longer with more judges,
unless we have to go over 500 billion judges.
Fix poll's CRUD subheaders I18N.
Make sure judgments can be emitted with keyboard only.
`:focus-within` <3 U CSS
Add a basic page to view a poll.
Move Poll CSS to LESS.
Clean up.
Tease about what will come next.
Add a repo header nav item for polls.
Ideally this whole thing should be a plugin and not a fork.
Not sure how to add new Db models and Routes.
We'd also need a custom spot in the issue view template,
but that can probably be merged upstream.
Clean up.
We'd love to move the routes to their own file.
And then being able to add them via `custom/`.
Disable event sourcing until /user/events do not hang for a minute,
because it makes browsing gitea rapidly impossible.
Add french translations for the polling UI.
Rename `Judgment` into `PollJudgment`.
After careful consideration, it's probably best to namespace.
Also, explicit is better than implicit. :)
BREAKING CHANGE: Not sure how the migrations will operate here.
This is why it's best to do it now than once we're actually using it.
Tweak the poll's labels for mobile with a CSS media query.
Thanks @pierre-louis for the bug report !
Review.
docs: explicit is better than implicit
chore: "missing" is more explicit than "lost"
feat: add radial merit profiles, in SVG
Ignore the gitea-repositories directory.
chore: clean up the radial merit profile SVG template
test: expose an issue with the tally
The returned amounts for each grade are wrong.
How could this happen, you ask?
Lack of unit-testing, that's why!
(also, shallow copy shenanigans)
chore: spacing
Still experimenting with the spacing in templates.
I know Gitea does not use spaces.
My sight is not getting any better,
and spacing helps a lot.
Yes, I'm already using bigger fonts.
test: refine the tests about the critical bug found
… so that it does not happen again!
fix: elbow grease the copy mechanism to fix The Bug®
fix: hide the description if none is provided.
Should we mention that it is a bad practice ?
It feels like it is. … To deliberate.
chore: review naive deliberator
feat: add the issue title to the list of issues of a poll
Also naive and inefficient, but if we paginate, we'll be ok.
And if not, we can probably improve this by batching the queries.
fix: remove a debugging tweak that was overlooked
Also, remove the need to translate the word `Issue`.
Oddly enough, it is never translated by itself,
it is only in plural form opr inside a sentence.
feat: add the merit profile behind the median grade
Usual CSS woes
- Really not confident about positioning top and left with `em`.
- Z-index shenanigans to skip unexpected offset in positioning,
where the absolute of a child in a relative container
won't point to top left but to bottom of other child in static
(try moving the merit profile below the input.emote, and remove z-indices)
Right now the merit profile is shown to all logged in, whether they judged or not. This is not the intended final behavior. Ideally we'd have settings fdr this.
chore: clean up before the next stage
Backport #15855
The Tor browser does not use the system-ui font and no other fonts in the stack match
its default fonts. In fact it is possible that it will in future only
match generic fonts. This means that all rendering will first try the
emoji fonts before falling back to the sans-serif font for glyphs.
In this case has the emoji fall back fonts for Tor contains empty glyphs
for numbers - in order to protect privacy - and leads to numbers being
rendered as empty glyphs. This is clearly not ideal and whilst we could
use the Arimo font - as I state above I suspect that Tor will eventually
ban detecting this and we should instead move the sans-serif font higher
in the stack so that it matches before the emoji fonts.
Partial fix of #15844
Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport #15737
* Fix close button change on delete in simplemde area
Fix issue with close button changing when deleting in the simplemde textarea.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* apply suggestion
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
* Project board improvements
- Fix link colors
- Extract CSS to own file
- Various minor tweaks to make it look better
Fixes: https://github.com/go-gitea/gitea/issues/15424
Fixes: https://github.com/go-gitea/gitea/issues/15506
Fixes: https://github.com/go-gitea/gitea/pull/15511
* fix squashed cards on small view area
* more css fixes, add second row from issue list
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* 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
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Backport #15323
It appears that there is a slight bug in the handling of the data of logout event -
the javascript should be testing the data field of the data field for the logout
instruction.
Signed-off-by: Andrew Thornton <art27@cantab.net>
- Create theme at runtime which follows the CSS variables of the site
- Disable a few opinionated Monaco defaults like minimap and word highlights
- Move styles to separate file
Backport #15275
A previous commit that sent unauthorized if the user is unauthorized
simply leads to the repeated reopening of the eventsource. #
This PR changes the event returned to tell the client to close the
eventsource and thus prevents the repeated reopening.
Signed-off-by: Andrew Thornton <art27@cantab.net>
- 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
* Push system-ui further down the stack, fix#12966
* Fix Firefox showing U+300x in emoji font and more
* Revert emoji font and fix long-standing Safari bug
* Exclude Safari emoji fix above 1.25x zoom
* Minor correctness/typo fix, affects only legacy platforms
* Emoji consistency for monospace (e.g. EasyMDE)
* Override paradigm; macOS/iOS-specific metric fix
* Move whitespace fix to font-face
* Handle metric calculation errors with Firefox
* One last workaround for aliased fonts in Linux
Support create single tag directly
support create tag with message from create release ui
Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
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
Move the stopwatches to the eventsource stream
Use the /user/events eventsource to update the stopwatches
instead of polling /api/v1/user/stopwatches if the eventsource
is enabled.
Signed-off-by: Andrew Thornton <art27@cantab.net>