Repository navigation
Introduce a few new mimetypes for code, fix recursive mimetype aliases - #19272
Conversation
|
I would like to question why we need this mime-types in the first place. It we don't show special icons in the web ui then this shoudn't matter. |
|
@karlitschek At the moment, some files that are code files (e.g. |
There was a problem hiding this comment.
We do not have »font« anymore. Please use »image« instead.
There was a problem hiding this comment.
I didn't touch this file manually, that was update-js doing that. I wonder what the real issue is...
|
@Xenopathic in the PR for the new mimetype icons I directly edited |
|
@jancborchardt Ahh, so your changes were made directly to the JS file instead of the source JSON files? |
a02647b to
cfe8935
Compare
|
@jancborchardt Changes made :) |
@Xenopathic yes, I am an idiot and didn’t know we have that new source JSON file. ;) |
|
Looks good 👍 @SergioBertolinSG please check if this fixes your issue. |
|
ok. It makes sense to show the code icon. 👍 |
|
I'm not seeing much improvement here. .class are not text, so it can stay with the undefined icon. .hpp and .c++ are correct. Many filetypes pending. |
|
Updated the c++ and cpp mimetypes. They now both map to code. @SergioBertolinSG you should run @Xenopathic feel free to squash our commits. |
|
@SergioBertolinSG I agree, @rullzer Please note that |
|
@rullzer thanks, now I can see fine also .xml, .java and .cpp. It ok for me to merge this 👍 but there are still lots pending. (some pretty popular like .cs or .rb) Also rtf as text. For me it doesn't fix the issue totally, but partially, yes. |
|
@Xenopathic ah ok fine by me. I just saw the discrepency between c++ and cpp. I'm fine either way. Regarding .class I also don't really care. Was just my first hit on google :P |
|
@rullzer RE cpp: oops, I was meant to change both of them then. Still, as long as the icons work properly |
|
@SergioBertolinSG PRs welcome 😄 |
f357718 to
68c2349
Compare
|
@Xenopathic you are right. cpp and c++ now both map to Rebased since #18893 was merged. |
There was a problem hiding this comment.
cpp is c plus plus - why is this changed
There was a problem hiding this comment.
The generally accepted mimetype for c++ files is text/x-c
There was a problem hiding this comment.
warg depending on the source you check it is text/x-c++src
and even text/x-csrc for c files...
|
Ok... so which list of mimetypes do we actually follow? |
|
@rullzer In case there's conflicts between sources on the web, I look at what |
|
Also, being radical for a moment: could ownCloud directly use /usr/share/mime? |
|
@Xenopathic no. because it is not quaranteed to exist. So probabaly But we could maybe write a script that just parses the stuff from https://wiki.freedesktop.org/www/Software/shared-mime-info/ and creates the proper mappings. |
68c2349 to
0d730d4
Compare
|
Anyway. Back on topic. |
|
@jancborchardt @SergioBertolinSG Is this complete enough for merge? I know it doesn't cover the full list of mimetypes, but it covers the important ones. |
0d730d4 to
03dbc84
Compare
|
Rebases to make sure there are no conflicts. Easy to review! |
There was a problem hiding this comment.
I think we need repair steps for the added extensions. Add it with a version number check in https://github.com/owncloud/core/blob/83db69b45d3ff5f49634839c0deafde91872a6b5/lib/repair/repairmimetypes.php#L264-264
But please raise the version number and check for everything that is smaller than the new one.
application/xml -> text/html -> text/code
* c++ and cpp now both map to code
03dbc84 to
5262614
Compare
|
@MorrisJobke added. |
* Version number increased
5262614 to
c80dd82
Compare
|
Tested and works 👍 |
|
@SergioBertolinSG Please review :) |
|
👍 |
Introduce a few new mimetypes for code, fix recursive mimetype aliases
|
Well I only see .java, .xml and .cpp files correct. Tex files has a text icon but cannot be opened. Many more remaining (.cs, .sql, .go...). I'll open a new issue to track the pending ones. |
|
Issue for tracking pending mimetypes: #19573 |
Some new/fixed mappings (and corresponding aliases):
.class.c++.hpp.java.rtfIn addition, recursive mimetype aliases for getting a filetype icon are implemented, which fixes the icon for XML. application/xml -> text/html -> text/code.
cc @jancborchardt @rullzer @SergioBertolinSG
Fixes #19254