4 ms·
The code style here looks really weird - for example, the 4 space hard tab is a rarity with JS: https://github.com/frend/frend.co/blob/gh-pages/_components/acco
by Bahamut 10y ago
The code style here looks really weird - for example, the 4 space hard tab is a rarity with JS: https://github.com/frend/frend.co/blob/gh-pages/_components/accordion/accordion.js https://github.com/frend/frend.co/blob/gh-pages/_components/... . Lot of rough edges there, such as not making use of Array.from(nodeList).forEach instead of brute forcing on the prototype. There's also some nasty DOM traversal as well in some of these components.
It should also be noted that these aren't web components in the Web Components sense - the title is very misleading. These are just vanilla components.
- richthegeek 10y agoA hard tab has no width. This is just how GH chooses to display it. Not to get in a tab-vs-space war, but that's like the primary benefit of it: you can display a hard-tab however you want. A soft/spaces-tab is displayed how the author wants it. (I use 2-space-tabs nowadays purely out of convention)
- adamduncan 10y agoA couple of points we can address here: Agree on the NodeList.prototype reassign - not a well informed decision (see source comments around its inclusion). We think it's worth correcting: https://github.com/frend/frend.co/issues/64 https://github.com/frend/frend.co/issues/64 Fully aware of the less-than-ideal DOM traversal in places - this is ripe for improvement: https://github.com/frend/frend.co/blob/gh-pages/_components/tabs/tabs.js#L126 https://github.com/frend/frend.co/blob/gh-pages/_components/... Let's shift the focus from code style to getting these components tested and improved for all users.