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

feat(seo): shift h1 tag from logo to discussion title #3724

Merged
merged 4 commits into from
Feb 11, 2023
Merged

Conversation

luceos
Copy link
Member

@luceos luceos commented Jan 22, 2023

Many times have we seen opponents of using h2 as the discussion title. Although my own SEO knowledge is limited, I have seen the importance of structuring pages according to the content you wish to prioritize. If we only take that into consideration there is zero reason for the app-wide identical logo to take precedence over any other heading.

Changes proposed in this pull request:

This change makes the logo a standard (visually identical) element, and makes the discussion hero title a h1.

Reviewers should focus on:

  • Do we want to do this (for 1.x)?
  • Do we need to make the logo element a different one?

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

Many times have we seen opponents of using h2 as the discussion title. Although
my own SEO knowledge is limited, I have seen the importance of structuring pages
according to the content you wish to prioritize. If we only take that into consideration
there is zero reason for the app-wide identical logo to take precedence over any
other heading.

This change makes the logo a standard (visually identical) element, and
makes the discussion hero title a h1.

Reviewers should focus on:

- [ ] Do we want to do this (for 1.x)?
- [ ] Do we need to make the logo element a different one?
@luceos luceos requested a review from a team as a code owner January 22, 2023 13:27
Copy link
Member

@SychO9 SychO9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .Hero h2 to .Hero h1 can be considered a breaking change styling-wise, but IMO a minor one that is easily fixable in custom designs.

Can you please also change other hero titles? (WelcomeHero TagHero and UserCard)

@SychO9 SychO9 added this to the 1.7 milestone Jan 22, 2023
@luceos
Copy link
Member Author

luceos commented Jan 22, 2023

Yeah I couldn't find a way to change this ti draft. Sorry.

@luceos
Copy link
Member Author

luceos commented Jan 22, 2023

Looking at my code, it seems, making the change completely, does affect quite some rendered HTML. If we merge this for 1.7 (or 1.x in general) an entry for the Dev Upgrade Guide is required and a possible warning for end users to report issues related to it.

Copy link
Member

@SychO9 SychO9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at my code, it seems, making the change completely, does affect quite some rendered HTML

I would reduce changes, for example, admin side components don't matter.

extensions/tags/views/frontend/content/tag.blade.php Outdated Show resolved Hide resolved
framework/core/js/src/forum/components/WelcomeHero.tsx Outdated Show resolved Hide resolved
@luceos
Copy link
Member Author

luceos commented Jan 22, 2023

I would reduce changes, for example, admin side components don't matter.

I think we should keep our structure uniform across frontends. If we make the change it's easier to explain priority changed across all frontends instead of just one.

@SychO9 SychO9 added the javascript Pull requests that update Javascript code label Feb 11, 2023
@SychO9
Copy link
Member

SychO9 commented Feb 11, 2023

@rob006 please feel free to contribute the other changes you mention in another PR 🙏🏼.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code type/seo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants