PrestaShop / hummingbird

81 stars 76 forks source link

Templates: fix formatting #593

Closed yannicka closed 6 months ago

yannicka commented 8 months ago
Questions Answers
Description? Currently there is no consistency in formatting. Sometimes there are two spaces, sometimes four; sometimes the tags are not aligned; sometimes single quotes are used, sometimes double quotes; sometimes there are spaces between tags, sometimes not, etc. The goal of this PR is to improve the situation, even if there is still a lot to do.
Type? refactor
BC breaks? no
Deprecations? no
Fixed ticket? N/A
Sponsor company N/A
How to test? Install the theme and browse the website.
SharakPL commented 8 months ago

I started something similar, but it's not worth it. You would only trigger lots of new translations for all languages so a lot of your changes are really unnecessary. Sorry

The rest can be fixed along the way while fixing other bugs without triggering updates of 100+ files.

yannicka commented 8 months ago

I've updated only few strings (two or three maybe). So it can be a separate PR without problem.

I don't think it's a problem to have a large PR like this. It helps to set things down a bit. Otherwise, it looks like it will never happen (it never has, even though the theme has been around for years).

I work every day with the PrestaShop theme (currently the "classic" one), and it would be nice to have a well-formatted code base, which makes work more pleasant.

Hlavtox commented 7 months ago

@yannicka Hey, first off, it's very cool to fix all the formatting things, but PR big like this makes it very difficult to review. :(

There are some things I don't like, for example the empty lines everywhere and others, but that could be discussed.

Do you think we can separate the PR into smaller chunks? For example - a PR that will only fix quotes " to '? That would be easy to review and could be merged right away. :-)

Also, you need to rebase it anyway, because some changes were merged.

yannicka commented 7 months ago

I'll see about cutting my PR into smaller chunks when I have time:

yannicka commented 7 months ago

" to ' done in #601. It's the least interesting change, but also one of the biggest (in terms of differential, not final cleanliness, as the change itself only brings consistency).

yannicka commented 7 months ago

Blank lines added to improve readability: #602.

yannicka commented 7 months ago

Fix search translation in #603.