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

[BUG] Title in page not fitting on one line when actions are present #1095

Closed
8 tasks
MortenGregersen opened this issue Jul 28, 2020 · 6 comments
Closed
8 tasks
Labels
bug component:Page major NOT Tech refined Needs Tech kickoff - solution outlined and agreed

Comments

@MortenGregersen
Copy link
Contributor

Describe the bug
When a non-breakable title is used in a page with titleMaxLines set to 1 and actions present, the title isn't fitting/scaled down on small screen sizes like the iPhone 5s/SE (5-inch).

In "Investment" in DRB we have a long non-breakable title and a wide button as action, so it isn't looking great on the small screens.

To Reproduce
Steps to reproduce the behavior:

Create a page like the following. The easiest is to use the PageFitHeadingExampleComponent in the Cookbook and change the title and add the actions.

<kirby-page title="Loremipsumbum" titleMaxLines="1">
  <kirby-page-actions *kirbyPageActions="{ sticky: false }">
    <button kirby-button>Get bacon</button>
  </kirby-page-actions>
  <kirby-page-content>
    <div>Some content</div>
  </kirby-page-content>
</kirby-page>

Kirby version

  • 1.2.53

Expected behavior
I would expect the title to scale down

Screenshots
Screenshot 2020-07-28 at 11 12 52

Please complete the following information:

  • OS: Doesn't matter
  • Browser: Doesn't matter
  • Browser version: Doesn't matter

Tasks:

  • Move issue from "Ready to do" -> "in progress" on our project board
  • Create Fix Branch
  • Create test reproducing the error
  • Fix
  • If relevant Update Examples and Showcase
  • Push commits to GitHub
  • Open a pull request (remember to add closes #issueno to the description) and ask @kirbydesign/kirby-guild for review
  • Merge to master and delete branch
@MortenGregersen MortenGregersen added bug NOT Tech refined Needs Tech kickoff - solution outlined and agreed NOT Prioritized Issue not yet prioritized and added to a Milestone component:Page labels Jul 28, 2020
@bommariusser
Copy link
Contributor

is this also happening when u have a button with only an icon @MortenGregersen ? :)

@MortenGregersen
Copy link
Contributor Author

is this also happening when u have a button with only an icon @MortenGregersen ? :)

Yes

Screenshot 2020-07-31 at 12 45 17

@bommariusser
Copy link
Contributor

bommariusser commented Aug 13, 2020

Jeah i see that. Long words and the page-title don't go along very well... :( But we are also aware of this and working on other kinds of headers. This doesn't mean that this shouldn't be fixed though :)

@RasmusKjeldgaard RasmusKjeldgaard added major and removed NOT Prioritized Issue not yet prioritized and added to a Milestone labels Apr 8, 2021
@stale
Copy link

stale bot commented Jun 17, 2021

This issue has been automatically marked as stale because of no recent activity. It will be closed in 10 weeks if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Automatically applied when there is no activity on an issue or PR label Jun 17, 2021
@RasmusKjeldgaard RasmusKjeldgaard removed the stale Automatically applied when there is no activity on an issue or PR label Jul 8, 2021
@jkaltoft
Copy link
Collaborator

Suggestion for solution

A solution must take into consideration what should happen when things do not fit. Expect the worst: Longer words, larger font sizes (which are controlled by the end-user), small device/viewport sizes etc.

Suggestion

@RasmusKjeldgaard
Copy link
Collaborator

Consider migrating to new header where this is fixed: https://cookbook.kirby.design/#/home/showcase/header
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:Page major NOT Tech refined Needs Tech kickoff - solution outlined and agreed
Projects
Status: ✅ Done
Development

No branches or pull requests

4 participants