Skip to content

Reduce weight of integrations page + list everything once#12260

Merged
frenck merged 3 commits into
currentfrom
frenck-2020-0238
Mar 4, 2020
Merged

Reduce weight of integrations page + list everything once#12260
frenck merged 3 commits into
currentfrom
frenck-2020-0238

Conversation

@frenck
Copy link
Copy Markdown
Member

@frenck frenck commented Mar 3, 2020

Proposed change

This PR focusses on reducing a bit of the integrations listing page, without major restructuring.

Currently, each integration is on the page for each category it is listed in.
This has been adjusted, the integration is just added to the javascript once, with a list of categories on each of them.

The search and filters have been adjusted to deal with that.

As a result, the all integrations page looks way cleaner, is less heavy and less data is transferred.

The downside of this, would be the missing categories on the cards. However, I'm not sure if that is a big "miss". Categories still do work (you can even still search for a category).

The magnitude of reduction: The list of integrations in the source is now 984 instead of 1556. That is more than 30% reduction, including the number of card elements displayed on the all integrations page.

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase:
  • This PR fixes or closes issue:

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

@probot-home-assistant probot-home-assistant Bot added the current This PR goes into the current branch label Mar 3, 2020
@frenck
Copy link
Copy Markdown
Member Author

frenck commented Mar 4, 2020

Github seems to be having issues with external builds again (the actions failed a couple of times as well).

However, Netlify did build. Result for this PR can be found here: https://5e5eee33cac6e200095e18d6--home-assistant-docs.netlify.com/integrations/#all

@frenck frenck requested a review from balloob March 4, 2020 00:08
@balloob
Copy link
Copy Markdown
Member

balloob commented Mar 4, 2020

Nice! Can we still have the main (1st) category on the card?

@frenck
Copy link
Copy Markdown
Member Author

frenck commented Mar 4, 2020

I did consider that to be honest. So some reasoning why I didn't :

  • The category names on the card, do not match the slug that is displayed on the card. If you click on Media Player as the category, the card will show media-player. Fixable, but still.

Screen Shot 2020-03-04 at 01 41 56

  • We don't have a rule or general use of: First listed element is the main category. Most of them are alphabetically sorted in the frontmatter. Fixable, but needs checking/adjusting ~900 pages.

@frenck
Copy link
Copy Markdown
Member Author

frenck commented Mar 4, 2020

I could branch of this PR and make a version that just picks the first category. Let's see what it does / how it looks.

@balloob
Copy link
Copy Markdown
Member

balloob commented Mar 4, 2020

I can write you a JS function btw to convert binary-sensor -> Binary Sensor.

@balloob
Copy link
Copy Markdown
Member

balloob commented Mar 4, 2020

I looked at it again, let's drop the category from the card.

@frenck frenck merged commit 96a3575 into current Mar 4, 2020
@frenck frenck deleted the frenck-2020-0238 branch March 4, 2020 08:03
felipediel pushed a commit to felipediel/home-assistant.io that referenced this pull request Mar 6, 2020
…tant#12260)

* Reduce weight of integrations page + list everything once

* Empty commit to re-trigger build

* Empty commit to re-trigger build
felipediel pushed a commit to felipediel/home-assistant.io that referenced this pull request Mar 6, 2020
…tant#12260)

* Reduce weight of integrations page + list everything once

* Empty commit to re-trigger build

* Empty commit to re-trigger build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current This PR goes into the current branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants