Commit graph

570 commits

Author SHA1 Message Date
064c91a109
Adding fonts and typography adjustments / Adição de fontes e ajustes de tipografia
---

[en-US]

- Font Imports and Definitions:
  - A new file, fonts_dataware.css, has been added. It defines the font faces for variable fonts (e.g. Inter Variable) as well as fallbacks for browsers that do not support them.
  - It also includes additional font-face rules for Fira Sans and Fira Mono in various weights and styles.

- Index File Update:
  - The main index CSS file now imports the new fonts_dataware.css to ensure that the custom fonts are loaded properly.

- Font Files:
  - Numerous new font files (both .ttf and .woff2 formats) for Inter and its various static versions (from Thin to Black, including italic, bold, extra-light, etc.) have been added.
  - License files such as the SIL Open Font License (OFL.txt) for Inter and additional documentation (README.txt) have also been included.

- CSS Formatting and Structure:
  - The base CSS file has been reformatted for better readability. For example, selector lists are now written on separate lines and numeric values (like margins and gaps) now use explicit decimal notation (e.g. `0.25rem` instead of `.25rem`).

- Responsive and Media Query Adjustments:
  - Minor tweaks in the media queries (such as for pagination menus) ensure better spacing and improved layout on small screens.

- Attention Block Styling:
  - The styles for blockquotes with different attention levels (note, tip, important, warning, caution) have been updated to list selectors on separate lines, which improves maintainability.

- Dropdown and Menu Adjustments:
  - The line-height for dropdowns is now broken into multiple lines for clarity.
  - Spacing (gaps) in inline-flex and flex containers has been standardized.

Overall, the diff consolidates formatting improvements across the CSS and updates the font setup to better align with the DATAWARE Forge brand.

---

- Importações e definições de fontes:
- Um novo arquivo, fonts_dataware.css, foi adicionado. Ele define as faces de fonte para fontes variáveis ​​(por exemplo, Inter Variable), bem como fallbacks para navegadores que não as suportam.
- Ele também inclui regras adicionais de faces de fonte para Fira Sans e Fira Mono em vários pesos e estilos.

- Atualização do arquivo de índice:
- O arquivo CSS de índice principal agora importa o novo fonts_dataware.css para garantir que as fontes personalizadas sejam carregadas corretamente.

- Arquivos de fonte:
- Vários novos arquivos de fonte (formatos .ttf e .woff2) para Inter e suas várias versões estáticas (de Thin a Black, incluindo itálico, negrito, extra-light, etc.) foram adicionados.
- Arquivos de licença como a SIL Open Font License (OFL.txt) para Inter e documentação adicional (README.txt) também foram incluídos.

- Formatação e estrutura CSS:
  - O arquivo CSS base foi reformatado para melhor legibilidade. Por exemplo, listas de seletores agora são escritas em linhas separadas e valores numéricos (como margens e lacunas) agora usam notação decimal explícita (por exemplo, `0.25rem` em vez de `.25rem`).

- Ajustes responsivos e de consulta de mídia:
  - Pequenos ajustes nas consultas de mídia (como para menus de paginação) garantem melhor espaçamento e layout aprimorado em telas pequenas.

- Estilo de bloco de atenção:
  - Os estilos para citações em bloco com diferentes níveis de atenção (nota, dica, importante, aviso, cuidado) foram atualizados para listar seletores em linhas separadas, o que melhora a manutenibilidade.

- Ajustes de menu e menu suspenso:
  - A altura da linha para menus suspensos agora é dividida em várias linhas para maior clareza.
  - O espaçamento (lacunas) em contêineres inline-flex e flex foi padronizado.

No geral, o diff consolida melhorias de formatação em todo o CSS e atualiza a configuração da fonte para melhor alinhamento com a marca DATAWARE Forge.

---

Marcos A. Lucas <mlucas@dataware.com.br>
2025-03-21 11:16:47 -03:00
babfd8b80c
feat: Set "dataware-light" as default theme and add "dataware-dark2" variants (with color vision deficiency adjustments) / Define "dataware-light" como tema padrão e adiciona variantes "dataware-dark2" (incluindo ajustes para daltonismo)
[en-US]
feat: Update DATAWARE Forge themes

- Set "dataware-light" as the default theme by updating DefaultTheme in modules/setting/ui.go.
- Expanded the theme list to include new entries: "dataware-light2", "dataware-dark2", "dataware-dark2-deuteranopia-protanopia", and "dataware-dark2-tritanopia".
- Added new theme files:
   • theme-dataware-dark2.css – A new optimized dark theme.
   • theme-dataware-dark2-deuteranopia-protanopia.css – Color adjustments for deuteranopia/protanopia in the dark2 theme.
   • theme-dataware-dark2-tritanopia.css – Color adjustments for tritanopia in the dark2 theme.
   • theme-dataware-light2.css – A new optimized light theme.
- Standardized formatting changes (spacing, margins) in CSS modules (e.g., divider.css, header.css).
- Redefined the color palette to align with the DATAWARE Forge visual identity, ensuring consistency and improved accessibility.

These changes expand visual options and optimize the user experience for various color vision needs.

[pt-BR]
feat: Atualização dos temas DATAWARE Forge

- Alterado o DefaultTheme para "dataware-light", definindo o tema light como padrão.
- Atualizada a lista de temas para incluir os novos: "dataware-light2", "dataware-dark2", "dataware-dark2-deuteranopia-protanopia" e "dataware-dark2-tritanopia".
- Adicionados novos arquivos de tema:
   • theme-dataware-dark2.css – Novo tema dark otimizado.
   • theme-dataware-dark2-deuteranopia-protanopia.css – Ajustes de cores para deuteranopia/protanopia no tema dark2.
   • theme-dataware-dark2-tritanopia.css – Ajustes de cores para tritanopia no tema dark2.
   • theme-dataware-light2.css – Novo tema light otimizado.
- Padronizadas alterações de formatação (espaçamento, margens) em módulos CSS (ex.: divider.css, header.css).
- Reconfigurada a paleta de cores para alinhar com a identidade DATAWARE Forge, garantindo consistência visual e melhor acessibilidade.

Essas alterações ampliam as opções visuais e otimizam a experiência para diferentes necessidades de percepção de cores.

Marcos A. Lucas <mlucas@dataware.com.br>
2025-03-20 22:30:45 -03:00
8f4326a1cf
fix: esquecido "@" em import em arquivo de tema 2025-03-09 02:52:42 -03:00
d2f541e8ff
Adaptação Tema DATAWARE e Variantes de Acessibilidade / DATAWARE Theme Integration and Accessibility Variants
Adaptação Completa do Tema DATAWARE e Criação de Variantes de Acessibilidade / Complete DATAWARE Theme Integration and Accessibility Variants

**Português:**

- Atualizado o tema padrão e a lista de temas em `modules/setting/ui.go`, alterando o default para `dataware-auto` e adicionando os novos nomes de temas.
- Revisado o arquivo `base.css`:
  - Atualizadas as variáveis de tipografia para priorizar as fontes "Inter", "Fira Sans" e "Fira Mono" com os devidos fallbacks.
  - Aumentado o valor de `--border-radius-medium` de 6px para 8px para uma aparência mais moderna.
- Criados e adaptados os novos arquivos de tema DATAWARE:
  - **`theme-dataware-auto.css`**: Implementa o auto-switch entre light e dark com base na preferência do usuário.
  - **`theme-dataware-dark.css`**: Redefinido com a nova paleta de cores para dark mode, utilizando o vermelho institucional (#C62848) como cor primária (com progressões de variações recalculadas) e o azul TI (#2E5A8D) como secundária.
  - **`theme-dataware-light.css`**: Aplicado o novo visual para light mode com a cor primária definida como #9E1B32 e demais variações alinhadas à identidade DATAWARE.
- Criadas as variantes de acessibilidade para deficiências na percepção de cores:
  - **Dark mode**:
    - `theme-dataware-dark-deuteranopia-protanopia.css`
    - `theme-dataware-dark-tritanopia.css`
  - **Light mode**:
    - `theme-dataware-light-deuteranopia-protanopia.css`
    - `theme-dataware-light-tritanopia.css`
  Esses arquivos ajustam especificamente os backgrounds e bordas dos diffs (adicionados e removidos) e do código para favorecer usuários com deuteranopia/protanopia e tritanopia.
- Atualizadas as cores de badges e outros componentes para refletir a nova identidade visual DATAWARE, garantindo consistência entre os modos claro e escuro.

**English:**

- Updated the default theme and theme list in `modules/setting/ui.go`, changing the default to `dataware-auto` and adding the new theme names.
- Revised the `base.css` file:
  - Updated typography variables to prioritize "Inter", "Fira Sans", and "Fira Mono" with proper fallbacks.
  - Increased `--border-radius-medium` from 6px to 8px for a more modern appearance.
- Created and adapted new DATAWARE theme files:
  - **`theme-dataware-auto.css`**: Implements auto-switch between light and dark modes based on user preference.
  - **`theme-dataware-dark.css`**: Redesigned with the new dark mode palette, using the institutional red (#C62848) as the primary color (with recalculated color variations) and TI blue (#2E5A8D) as the secondary.
  - **`theme-dataware-light.css`**: Applies the new visual for light mode with the primary color set to #9E1B32 and aligned variations according to the DATAWARE identity.
- Created accessibility variants for color perception deficiencies:
  - **Dark mode**:
    - `theme-dataware-dark-deuteranopia-protanopia.css`
    - `theme-dataware-dark-tritanopia.css`
  - **Light mode**:
    - `theme-dataware-light-deuteranopia-protanopia.css`
    - `theme-dataware-light-tritanopia.css`
  These files specifically adjust diff backgrounds, borders, and code backgrounds to accommodate users with deuteranopia/protanopia and tritanopia.
- Updated badge colors and various component styles to fully reflect the new DATAWARE visual identity across both light and dark themes.

---

Este commit consolida todas as alterações necessárias para a personalização do Forge em DATAWARE Forge, garantindo a integração da nova paleta de cores, tipografia e suporte a acessibilidade.

Marcos A. Lucas <mlucas@dataware.com.br>
2025-03-09 02:48:56 -03:00
Otto Richter
4f8d96a6de Rework user profile settings
Accessibility:

- improved semantic layout
- Fixes unlabelled input for custom pronouns. CC @hazy
- Adds labels to dropdowns.
- Shortens certain texts for less verbose screen reader outputs and
  people with slow reading speed.
- Turned optional username rename helper text with low contrast into
  "normal" help text.

UI/UX:

- Removes section about primary email which is no longer managed in the
  profile section.
- Fixes section about primary email not displaying in user settings when notifications are
  not available.
- Removes primary email display, because it is not actually a form
  element here. (Alternatively, we could display it and link to the
account settings for managing the email)

(cherry picked from commit 2885ea8da2)
2024-12-30 20:29:15 +00:00
Earl Warren
eb00a80efc Merge pull request '[v10.0/forgejo] Rework new repo dialog' (#6399) from bp-v10.0/forgejo-471e5b1-8159915-4cde569-8d32ca3-8d829a9 into v10.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6399
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-12-29 20:49:03 +00:00
0ko
440be42baf ui: cosmetic changes and fixes around repo homepage
(cherry picked from commit 02c34f9908)
2024-12-29 14:47:11 +00:00
Otto Richter
38d2933cc1 New repo: Clean up and improve CSS
- drop custom layout rules for this page
- move form-related content to form.css
- extend new form CSS to add gap between labels and input fields

(cherry picked from commit 471e5b1975)
2024-12-29 13:23:30 +00:00
0ko
4e820ff795 feat(ui): show repo size on mobile (#6344)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6344
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-22 17:05:27 +00:00
Shiny Nematoda
ee214cb886 feat: filepath filter for code search (#6143)
Added support for searching content in a specific directory or file.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6143
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-12-22 12:24:29 +00:00
Otto
f94b159704 Merge pull request 'Put issue actions in a single row on mobile' (#6044) from 0ko/forgejo:ui-commenting-singlerow into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6044
Reviewed-by: Otto <otto@codeberg.org>
2024-12-16 21:13:18 +00:00
0ko
6e729b6179 ui: simplify main-attribute labels 2024-12-08 17:30:52 +05:00
Earl Warren
1b796fd2d9 Merge pull request 'Fix wiki search overflowing on wide screens (#6047)' (#6063) from spiffyk/forgejo:wiki-search-too-wide into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6063
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-11-27 18:28:27 +00:00
0ko
787e3163f8 fix(ui): put buttons in a single row on mobile 2024-11-25 18:43:09 +05:00
Oto Šťáva
c0777279fe
Fix wiki search overflowing on wide screens (#6047)
Confine the search menu to be at most the width of the page, or 80% of
the viewport width, whichever is smaller. To do this, introduce a new
`--container-width` variable for the descendant elements of
`.ui.container` to be able to access.

Also update the relevant e2e test: add a long 'lorem ipsum' page, add a
search for it, parameterize the width.
2024-11-25 09:50:13 +01:00
Daniel Gibson
4ec627c0b1 Improve colors used by colorblind-friendly forgejo themes
I found them to have too little contrast so I tweaked them a bit.
Screenshots and discussion can be found at:
https://codeberg.org/forgejo/forgejo/pulls/1746#issuecomment-2442469

Thanks a lot to @jpkhawam for creating the colorblind themes and for
helping me improving my changes even further! :)
2024-11-24 14:04:27 +00:00
0ko
33c2caa0c8 fix(ui): apply smaller padding to comment headers 2024-11-19 17:11:37 +05:00
MrSmoer
8587d49979 Remove unused css class "form-field-content-aside-label"
This css class was used to display the "forgot password"-link right and above the password field.
cd75519a0b moves this link, so this class is now unused
2024-11-09 22:59:50 +00:00
Ragnar Groot Koerkamp
e58d5d46c1 [THEME] Copy ansi terminal colours from gitea to forgejo themes 2024-11-09 21:14:31 +01:00
0ko
dbe2846e3b ui: improve commit graph layout 2024-09-17 17:33:00 +02:00
Otto
d78598ef0d Merge pull request 'ui: wiki/code search fixes' (#5260) from snematoda/search-ui-fix into forgejo
closes forgejo/forgejo#5259 (leftover arrowhead in Safari)
Fixes long results in wiki search overflowing the page

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5260
Reviewed-by: Otto <otto@codeberg.org>
2024-09-14 19:38:35 +00:00
Shiny Nematoda
5365ca76ce ui(code-search): webkit hack to hide marker for summary tags
closes forgejo/forgejo#5259
2024-09-14 14:22:13 +00:00
Otto Richter
a62521f241 New release form semantics
- correctly render labels without help text
- accessibility: fix external release button focus
- accessibility: test form aspects in browser test
2024-09-11 13:30:30 +02:00
Malte Jürgens
28643cc276 Fix bad spacing on new release page 2024-09-11 13:30:30 +02:00
0ko
b95519355c ui: pr diff: remove rule breaking headers 2024-08-22 22:25:02 +05:00
Otto Richter
83d2b3b7fa Implement CSS-only input toggling, refactor related forms
UX/Translation changes:

- new teams: remove redundant tooltips that don't add meaningful information
  - move general information to table fieldset
- new teams: rename "general" to "custom" access for clarity
- new teams: show labels beside options on mobile

Accessibility:

- semantic form elements allow easier navigation (fieldset, mostly)
- improve better labelling of new teams table
- fix accessibility scan issues
- TODO: the parts that "disable" form elements were not yet touched and
  are not really accessible to screenreaders

Technical:

- replace two JavaScript solutions with one CSS standard
- implement a simpler grid (.simple-grid)
- simplify markup
- remove some webhook settings specific CSS

Testing:

- check more form content for accessibility issues
- but exclude tooltips from the scan :(
- reuse existing form tests from previous PR
2024-08-21 15:03:19 +02:00
Gusted
0764b7c18b
[UI] Remove snapping for images on project cards
Remove the snapping of the images on the projects cards, the images are
way too small to notice that when scrolling you're being snapped to
these images and when you do notice it, it doesn't make sense as you
wouldn't expect it to be snapped.
2024-08-20 16:02:52 +02:00
Simon Priet
8e46efef95
[PORT] Scroll images in project issues separately from the remaining issue (gitea#31683)
As discussed in https://github.com/go-gitea/gitea/issues/31667 &
https://github.com/go-gitea/gitea/issues/26561, when a card on a Project
contains images, they can overflow the card on its containing column.
This aims to fix this issue via snapping scrollbars.

---
Conflict resolution: none

(cherry picked from commit fe7c9416777243264e8482d3af29e30c2b671074)
2024-08-20 15:54:22 +02:00
Otto Richter
c9e402afdc feat(tmpl): Introduce semantic HTML in forms
Modifies forms:

- (new) org team
- (new) repo webhook
- (new) repo protected branch

The forms are not completely rewritten to semantic HTML yet. The focus
of this change was on standard elements, some custom solutions were left
untouched for now.

- swaps the order fo permission radio buttons as per https://codeberg.org/forgejo/forgejo/issues/4983
- uses fieldsets to group related inputs
  - ensures consistent styling across forms
  - can be improved later, e.g. using horizontal lines between sections
- fixes: previous font size of labels was smaller than the font size of the help text
- help text are now part of the label, clicking them now also activates the input
- drop unused CSS (no required checkboxes in grouped class remain)
- playwright testing:
  - move login boilerplate to utils
  - automated form accessibility checking
    - allow defining the scope, because legacy parts of the forms are not yet accessible
  - assert some CSS properties that should not be overriden
- the Makefile adjustment was necessary, because eslint scanned some internal files in the tests/e2e/reports directory
2024-08-19 01:14:18 +02:00
0ko
ecad5c9aae Merge pull request '[UI] Add background to reactions on hover' (#4836) from gusted/forgejo-reaction-bg into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4836
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-06 09:54:28 +00:00
Shiny Nematoda
06d2e90fa4 feat: highlighted code search results (#4749)
closes #4534

<details>
<summary>Screenshots</summary>

![](https://codeberg.org/attachments/0ab8a7b0-6485-46dc-a730-c016abb1f287)
</details>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4749
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-08-06 05:57:25 +00:00
Gusted
cc11b3027c
[UI] Add reaction hover background color
- Follows 595e8abd68
- Add the reaction hover background color variable, slightly lighter
than the active background color.
2024-08-06 02:07:02 +02:00
0ko
a4f1d0bc43 fix(ui): prevent uppercase in header of dashboard context selector 2024-08-04 16:10:15 +05:00
0ko
cad8d09ba8 ui: refactor user-cards as a grid 2024-08-02 19:27:31 +05:00
silverwind
f37d8fc0ed
Remove unneccessary uses of word-break: break-all (#31637)
Fixes: https://github.com/go-gitea/gitea/issues/31636

1. Issue sidebar topic is disussed in
https://github.com/go-gitea/gitea/issues/31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 0c1127a2fb4c07576b4a2e4cffbcd2b0c8670a27)
2024-07-22 15:50:57 +02:00
Beowulf
7dc0b2bab6
Remove APA as cite format
This removes APA as cite format, because it depends on an copyleft
dependency (https://github.com/Juris-M/citeproc-js).
2024-07-20 15:48:57 +02:00
Gusted
a83002679d
[UI] Replace vue-bar-graph with chart.js
- The usage of the `vue-bar-graph` is complicated, because of the `GSAP`
dependency they pull in, the dependency uses a non-free license.
- The code is rewritten to use the `chart.js` library, which is already
used to draw other charts in the activity tab. Due to the limitation of
`chart.js`, we have to create a plugin in order to have images as labels
and do click handling for those images.
- The chart isn't the same as the previous one, once again simply due to
how `chart.js` works, the amount of commits isn't drawn anymore in the
bar, you instead have to hover over it or look at the y-axis.
- Resolves #4569
2024-07-19 21:07:18 +02:00
0ko
326958316d ui: fix issue labels 2024-07-17 16:19:44 +05:00
0ko
16224ebd33 ui: use alt bg color for labels in hovered menu items (#4458)
A followup for https://codeberg.org/forgejo/forgejo/pulls/2935.
Re-use the alt bg color for labels inside menu items that are hovered, to keep the label box visible.

Preview: https://codeberg.org/attachments/d649b2d9-0838-49af-be6a-766de2faf52e

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4458
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-12 11:12:51 +00:00
Earl Warren
8acaa427d6 Merge pull request 'Port of Refactor login page' (#4400) from 0ko/forgejo:ui-login-redesign into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4400
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-10 04:15:56 +00:00
Earl Warren
8d64891b8b Merge pull request '[BUG] Fix mobile UI for organisation creation' (#4382) from gusted/mobile-org into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4382
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-07 19:28:30 +00:00
Anbraten
629ca22a97 Refactor login page (#31530)
As requested in
https://github.com/go-gitea/gitea/pull/31504#issuecomment-2196196646.
This PR refactor the login page:

![Screenshot from 2024-07-04
19-23-10](https://github.com/go-gitea/gitea/assets/6918444/c45700f4-6747-473c-bdee-2156718a7953)

![Screenshot from 2024-07-04
19-23-21](https://github.com/go-gitea/gitea/assets/6918444/b1bf71cf-85f9-4517-a409-cc6d72e6af8f)

![Screenshot from 2024-06-30
09-35-20](https://github.com/go-gitea/gitea/assets/6918444/728cc37e-0cca-4883-afec-a43663d2c666)
- [x] use separate box for passkey login and go to registration
- [x] move forgot passoword next to password label
- [x] fix password required label `*` and padding
- [x] remove tabs from login page

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 9c00dda33ad7bd594dd8f331fa1bf0acefc2ca54)

Conflict resolution:
* signin_navbar.tmpl has been deleted
* additions in form.css
* major code changes in signin_openid
* ...
2024-07-07 14:22:44 +05:00
0ko
c19222b22f ui: improve button gap consistency in repos (#4365)
Improve UI in a few areas in a similar way to dc0d3a40ab. Ensure consistent 0.5em gaps in button rows, make buttons have more consistent horizontal paddings for better clickability.

Preview:
https://codeberg.org/attachments/cfca200a-3b68-4ba8-9876-75cea7822a00
https://codeberg.org/attachments/aaa5d387-919b-45af-8854-6d0f5273125f
https://codeberg.org/attachments/989225b7-b1dd-491d-bf76-7e4a962ea54e

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4365
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-07 03:21:58 +00:00
Gusted
610487eb83
[BUG] Fix mobile UI for organisation creation
- Don't make checkpoints or radio inputs full width on a small screen,
these obviously shouldn't try to take up the whole width of a container.
- Wrap the label for organisation permission box inside a `<span
class="inline field">`, so it gets a left-margin from the `.inline.field
> :first-child` selector. This make the checkboxes and radio buttons
groups look indented from the left.
- Resolves #4361
2024-07-07 01:37:38 +02:00
Danko Aleksejevs
36b6444f34 Remove tab key handling in markdown editor, add toolbar buttons instead, re #4072 #4142 (#4263)
We haven't decided much (to my knowledge), and I've been using the main branch in production (as one does) and found out even I myself rely on Tab sometimes working to move focus and have been caught off guard by it indenting lines instead.

So this removes Tab handling and instead adds two new buttons to the toolbar. The indentation logic is unchanged (other than now focusing the textarea during button handling, to ensure execCommand works, and thus undo history is preserved).

I'm not sure which terminology to use in tooltips. Could also add keyboard shortcuts for the whole toolbar eventually, but as is this is hopefully an better solution to the problems I previously created than un-merging the whole thing :)

<img width="414" alt="Screenshot with two new buttons" src="/attachments/b7af3aa4-a195-48d1-be0a-1559f25dce8e">

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4263
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2024-06-30 13:03:32 +00:00
0ko
dc0d3a40ab ui: improve button gap consistency 2024-06-28 13:11:32 +05:00
0ko
7299b2def4 chore: rename class issue-title-buttons to button-row 2024-06-28 13:11:16 +05:00
Mai-Lapyst
51735c415b Add support for workflow_dispatch (#3334)
Closes #2797

I'm aware of https://github.com/go-gitea/gitea/pull/28163 exists, but since I had it laying around on my drive and collecting dust, I might as well open a PR for it if anyone wants the feature a bit sooner than waiting for upstream to release it or to be a forgejo "native" implementation.

This PR Contains:
- Support for the `workflow_dispatch` trigger
- Inputs: boolean, string, number, choice

Things still to be done:
- [x] API Endpoint `/api/v1/<org>/<repo>/actions/workflows/<workflow id>/dispatches`
- ~~Fixing some UI bugs I had no time figuring out, like why dropdown/choice inputs's menu's behave weirdly~~ Unrelated visual bug with dropdowns inside dropdowns
- [x] Fix bug where opening the branch selection submits the form
- [x] Limit on inputs to render/process

Things not in this PR:
- Inputs: environment (First need support for environments in forgejo)

Things needed to test this:
- A patch for https://code.forgejo.org/forgejo/runner to actually consider the inputs inside the workflow.
  ~~One possible patch can be seen here: https://code.forgejo.org/Mai-Lapyst/runner/src/branch/support-workflow-inputs~~
  [PR](https://code.forgejo.org/forgejo/runner/pulls/199)

![image](/attachments/2db50c9e-898f-41cb-b698-43edeefd2573)

## Testing

- Checkout PR
- Setup new development runner with [this PR](https://code.forgejo.org/forgejo/runner/pulls/199)
- Create a repo with a workflow (see below)
- Go to the actions tab, select the workflow and see the notice as in the screenshot above
- Use the button + dropdown to run the workflow
  - Try also running it via the api using the `` endpoint
- ...
- Profit!

<details>
<summary>Example workflow</summary>

```yaml
on:
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log Level'
        required: true
        default: 'warning'
        type: choice
        options:
        - info
        - warning
        - debug
      tags:
        description: 'Test scenario tags'
        required: false
        type: boolean
      boolean_default_true:
        description: 'Test scenario tags'
        required: true
        type: boolean
        default: true
      boolean_default_false:
        description: 'Test scenario tags'
        required: false
        type: boolean
        default: false
      number1_default:
        description: 'Number w. default'
        default: '100'
        type: number
      number2:
        description: 'Number w/o. default'
        type: number
      string1_default:
        description: 'String w. default'
        default: 'Hello world'
        type: string
      string2:
        description: 'String w/o. default'
        required: true
        type: string

jobs:
  test:
    runs-on: docker
    steps:
      - uses: actions/checkout@v3
      - run: whoami
      - run: cat /etc/issue
      - run: uname -a
      - run: date
      - run: echo ${{ inputs.logLevel }}
      - run: echo ${{ inputs.tags }}
      - env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"
      - run: echo "abc"
```
</details>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3334
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Co-committed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-06-28 05:17:11 +00:00
Earl Warren
c6a6294046 Merge pull request '[gitea] week 2024-26 cherry pick (gitea/main -> forgejo)' (#4213) from earl-warren/wcp/2024-26 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4213
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-25 06:15:54 +00:00
0ko
c82547bf30 Size/gap changes and cleanup in commit graph (#4214)
Changes:
* increased font size of tag/branch labels from tiny to normal, so they're readable, it doesn't impact layout
* increased font size of branch selector from tiny to small, so it's readable and usable. Branch selector on main repo tab has the same size
* increased gap between the icon and the text in the selector, it is too small currently
* removed obsolete CSS rule, it wasn't fully utilized in the first place, it is no longer needed with the other changes

Preview:
Before: https://codeberg.org/attachments/e6eccdde-59fe-446c-99ed-d8a2f1dce9bd
First: https://codeberg.org/attachments/6d710118-18cb-4258-9d9a-79dfca377294
Last: https://codeberg.org/attachments/fc9517aa-d498-43cc-a186-a184e4c6fe8c

Before: https://codeberg.org/attachments/057f971b-2c3b-4500-923f-49f4e545daf6
First: https://codeberg.org/attachments/de4683ad-95da-48d5-b2ac-b9567fed6fcd
Last: https://codeberg.org/attachments/2abb0333-dea1-4123-b3ee-9cb54dca98cd

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4214
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-24 18:59:57 +00:00