I am currently in the process of creating a user interface similar to Whatsapp web. My tools include Bootstrap 4 and Ember 3.2. The foundation of my idea is set, with a message box positioned at the bottom of the screen using the fixed-bottom Bootstrap class. I have also successfully implemented a message list that automatically scrolls down within a custom component container.
export default Component.extend({
didRender() {
this.$().parents('html, body').scrollTop(this.$(document).height()); // Scroll immediately
}
});
In regards to the styling of the list:
<div id="ember390" class="ember-view">
<div class="container-fluid pt-5" style="border: 1px solid red;margin-bottom: 32vh;">
I have added a margin-bottom: 32v which lifts the message list above the input box. This technique works well on full HD screens but poses challenges on smaller displays due to Bootstrap's responsive design.
My workaround involves calculating the margin-bottom value based on window size and the message box container. However, I am unsure if this approach is correct or if there is a pure CSS alternative.
Additionally, integrating jQuery with Ember.js introduces complexities such as limited access to the message input container within the message list component.
For reference, here is an example: https://www.bootply.com/QKVffslOIf