Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

remote: Problem with remote controll layout in Firefox Mobile #752

Closed
1 task done
Eccenux opened this issue May 31, 2020 · 6 comments
Closed
1 task done

remote: Problem with remote controll layout in Firefox Mobile #752

Eccenux opened this issue May 31, 2020 · 6 comments
Labels
bug Something isn't working remote Remote control
Milestone

Comments

@Eccenux
Copy link
Contributor

Eccenux commented May 31, 2020

Affected part of DeckDeckGo

  • Remote control

Reproduction

Steps to reproduce:

  1. Create/open a presentation
  2. Share.
  3. Open with Firefox on Android.

Expected Behavior

I should see Next/Previous buttons in full.

Actual Behavior

Buttons are cut off
cut off buttons

Here is a full page screen (scrolled-screen):
buttons cut in two

Note that you should be able to use a vh-calc trick to avoid this problem cross-browser:
https://css-tricks.com/the-trick-to-viewport-units-on-mobile/

Environment

  • Browser(s): Firefox for Android
  • Operating System (e.g. Windows, macOS, Ubuntu): Android.
@peterpeterparker
Copy link
Contributor

peterpeterparker commented Jun 1, 2020

Which version of Firefox are you using?

I'm using v76 on desktop and I don't face such issues.

Capture d’écran 2020-06-01 à 07 47 11

Capture d’écran 2020-06-01 à 07 47 15

@peterpeterparker peterpeterparker added the question Further information is requested label Jun 1, 2020
@Eccenux
Copy link
Contributor Author

Eccenux commented Jun 1, 2020

You are using desktop Firefox. Firefox on Android (mobile) is not the same thing. I use latest Firefox on Android. Note that this is probably an issue with hiding the address bar which is only a thing on mobile.

Also note that Firefox on an iPhone (as all other browsers) is just Safari based webview. So you can only really test on Android.

@peterpeterparker peterpeterparker changed the title Problem with remote controll layout in Firefox remote: Problem with remote controll layout in Firefox Mobile Jun 1, 2020
@peterpeterparker peterpeterparker added bug Something isn't working remote Remote control and removed question Further information is requested labels Jun 1, 2020
@peterpeterparker
Copy link
Contributor

Thx for the feedback, Firefox Mobile only, well noted.

Can you provide a PR?

@Eccenux
Copy link
Contributor Author

Eccenux commented Jun 2, 2020

I didn't found any clear instructions on how to build the whole project... But I was able to figure out some details in devtools.

Note that you should also get nicer layout for Chrome too.

I think the `app-remote` needs some re-structuring:

  1. In main add a container with a class `.deck-container`.
  2. Put prev/next directly in the container (after .deck).
  3. Be sure that app-notes is outside of the container.
  4. Apply style changes (notice `height: calc(100% - 8px)`).
  5. You might need to tweak some layouts inside the button.

That last 8px is crucial because animations for the buttons makes them bigger and this seem to mess-up layouts.

Style changes:

app-remote main.connected {
  	/* display: grid; */
  	/* grid-template-rows: calc((100% - 64px) / 2) calc((100% - 64px) / 2) 64px; */
}
app-remote main.connected div.deck {
  	margin-bottom: 0px;
}

.deck-container {
  	display: grid;
  	grid-template-columns: 1fr 1fr;
  	grid-template-areas: 
  		"deck deck" 
  		"prev next"
  	;
  	grid-template-rows: 1fr 1fr;
  	height: calc(100% - 70px);
  	grid-gap: 1em;
}

.deck {
  	grid-area: deck;
}
.deck-navigation-button-prev {
  	grid-area: prev;
  	padding-left: 1em;
}
.deck-navigation-button-next {
  	grid-area: next;
  	padding-right: 1em;
}
.deck-navigation-button-prev ion-button,
.deck-navigation-button-next ion-button {
	height: calc(100% - 8px);
	width: 100%;
	box-sizing: border-box;
}

After similar changes in WebIDE I got something like this (purple lines show the new grid):

@peterpeterparker
Copy link
Contributor

Thank you for the details. Not sure that it can be styled as you described above as the notes might be a separate component. Moreover the current classes, for example .connected, have to be preserved.

Also note that if it need to be "re-structured", then it's important then it still work as expected: on any devices and with a different grid/presentation if portrait or landscape.

To start locally the remote:

git  clone https://github.com/deckgo/deckdeckgo
cd deckdeckgo/remote
npm  i
npm run start

@Eccenux Eccenux mentioned this issue Jun 7, 2020
7 tasks
@peterpeterparker peterpeterparker added this to the v1.4.0 milestone Jun 7, 2020
@peterpeterparker
Copy link
Contributor

It's is live.

Thx @Eccenux for the issue and PR, awesome 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working remote Remote control
Projects
None yet
Development

No branches or pull requests

2 participants