Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minify semantic.dropdown.custom.js #8971

Closed
guillep2k opened this issue Nov 13, 2019 · 5 comments · Fixed by #9064
Closed

Minify semantic.dropdown.custom.js #8971

guillep2k opened this issue Nov 13, 2019 · 5 comments · Fixed by #9064
Labels
type/enhancement An improvement of existing functionality

Comments

@guillep2k
Copy link
Member

Thanks to #8598 now /js/index.js minified (58KB👍). However, /js/semantic.dropdown.custom.js (141KB) is still not (it's not a vendored library).

@silverwind
Copy link
Member

silverwind commented Nov 13, 2019

We can import from index.js so it will be put in the main bundle. I'm working on a PR that will enable us to use import syntax and other modern JS features.

edit: #8973

@lunny
Copy link
Member

lunny commented Nov 14, 2019

I also send a #8975 to allow us pack serval js to index.js.

@lunny lunny added the type/enhancement An improvement of existing functionality label Nov 14, 2019
@silverwind
Copy link
Member

@Jookia is there some way to verify whether the customization from #8638 works? For example on https://try.gitea.io/repo/create, I don't see any aria-* attributes on the dropdown HTML. Is it already broken?

<div class="ui selection owner dropdown" tabindex="0">
  <input type="hidden" id="uid" name="uid" value="476" required="">
  <span class="text" title="silverwind"><img class="ui mini image" src="/user/avatar/silverwind/-1">
      silverwind</span>
  <i class="dropdown icon" tabindex="0"><div class="menu" tabindex="-1"></div></i>
  <div class="menu" tabindex="-1">
    <div class="item active selected" data-value="476" title="silverwind" tabindex="-1">
      <img class="ui mini image" src="/user/avatar/silverwind/-1">
      silverwind
    </div>
      <div class="item" data-value="16251" title="silverwind-org" tabindex="-1">
        <img class="ui mini image" src="/user/avatar/silverwind-org/-1">
        silverwind-org
      </div>
      <div class="item" data-value="1069" title="my-cool-organization" tabindex="-1">
        <img class="ui mini image" src="/user/avatar/my-cool-organization/-1">
        my-cool-organization
      </div>
  </div>
</div>

@Jookia
Copy link
Contributor

Jookia commented Nov 18, 2019

That's not a dropdown menu, it's a dropdown selection. The language selection at the bottom of the page has aria-* attributes

@silverwind
Copy link
Member

Thanks, I see the attributes there.

silverwind added a commit to silverwind/gitea that referenced this issue Nov 19, 2019
Also disabled a annoying linter rule which insisted that imports can not
contain a file extension.

Fixes: go-gitea#8971
techknowlogick pushed a commit that referenced this issue Nov 21, 2019
* move semantic.dropdown.custom.js to webpack

Also disabled a annoying linter rule which insisted that imports can not
contain a file extension.

Fixes: #8971

* reorganize web_src files and rebuild

* restart ci
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants