So this is more a design/tooling question (no code to show)
The Idea:
I have an idea for a web app that I'd like to implement using either React/Angular depending on the outcome of this discussion really. The idea is that I want to be able to bundle up my web application and embed it in any website with as little code as possible. The end result for the website it's embedded on would be a new 'widget style' button hovering in the corner which when clicked opened up my new React/Angular application in a pop up or layover modal style window.
To be clear, I want to, if possible provide the clients host website with as little code as possible such as:
<script src="https://myappurl.js"><script>
<some-new-element-in-html-body?> </some-new-element-in-html-body?>
This would then leave them with a widget style button that when clicked opened my app as a layover
The How:
Now I know there are probably a few ways of implementing this. I come from an Angular development background as a full stack dev so embedding apps within websites would be a new concept to me. I guess the outcome I want is similar to that of a chat widget application on a website.I'm struggling to find online the best solution or toolset for the job.
Web components seem to have popped up quite a lot. This would result in me having to provide the website with the tag and the new html element but could this then add a widget style button which triggered the application popup. I've also read that React/Angular bundle sizes may be too much for web components, even in smaller apps, so something like preact may be preferred? Again the same question above stands. This youtube video explains preact/react web components and wonder if its the best option - https://www.youtube.com/watch?v=PUGDzA1uP-Y&t=545s
iFrames are definitely an option if I wanted to simply mount my application with any other website. That said its not really what I'm after, as although I want the contained app, I also want to be able to add this custom widget style button to the host website, without having to edit the website directly.
UMD Libraries - again something else I've come accross but this is the most unclear, and how they differ or would benefit my specific scenario compared to web-components.Now I may be barking up the wrong tree completely, and if so could you kind people please point me in the right direction of what I should be looking at.
I may also need to consider 2 apps, one for rendering a button that loaded quickly annd then facilitated the popup / modal type layover, and then one which loaded up my application with one of the 3 methods mentioned above?
THANKYOU IN ADVANCE! :)
Related
I'm building a chat UI using React and it needs to be accessible. I am using the Wolox/react-chat-widget. I do not want to use the badge function. When testing it using the WAVE tool, tt triggers an empty button error for the web chat launcher button. What is a work around for fixing this issue without modifying the base library?
There is no way to fix this without either extending or editing the source.
The error is caused because the button to launch chat has no readable content, only an SVG file.
You could easily fix this (albeit not an ideal fix but the minimum effort way of doing it) by modifying components/Widget/components/Launcher/index.js to simply add information to the alt tag that is currently empty in the open and close image. (alt="close chat", alt="open chat").
Better yet send a pull request asking the author to update it so everyone benefits from the added accessibility.
Bear in mind that there are loads of other accessibility issues to consider with this chat such as managing the focus within the modal, escape key to close etc. (it may have these but you have to think about them.)
I am very new to frontend development. I have created an ember app which has a feed page. The feed page is mainly consists of images and their associated likes and comments. Now what I want is when I click on images it should open the original size image and its likes and comments (Very much similar to Facebook's feed, when you click on images it opens a new window or card in which all information about it is present). Pinterest has similar behavior. How can I achieve the same thing? I am not very sure where look or start. Please give some examples and demos so that I can have a better understanding.
You can use the ember addon ember-modal-dialog for a straight forward way to achieve the 'new window' you are referring to. See the demo here. In general, Ember Observer is a good place to check for ember addons - particularly UI components that you can quickly leverage.
I have a website that has merged with another. It is a high ranking website so instead of using a redirect or similar I would like to keep the website online as is so that it does not affect SEO.
I want it so that when users visit the website it appears grayed out and a central box is shown with a message saying that the website has moved to www.newsite.com and they are not able to click any buttons etc. on the page.
Is it possible using jQuery or similar?
This is possible with jQuery modal, but to be quite honest your best bet really is to issue a permanent redirect (301) to the new site. You can likewise go to each of the major search engines and use their webmaster tools to indicate the site has moved. Your SEO ranking might dip briefly but the search engines really do recognize the fact that sites and content move these days, and the ranking won't be permanently affected.
You could do this however you like. JavaScript is probably not needed here. Create a simple modal, and style it in such a way that it looks how you have envisioned.
There are jQuery plugins to do this kind of thing, but honestly that's going to be more work to hook up and create more overhead than you would just making your own.
If you need some CSS help to accomplish this, let me know and I'll update my answer.
You can hide Everything in body and append a div and style it like an modal or something as you like
$(document).ready(function(){
node = $("<div id='modal'>Site has been Moved moved etc.. </div>")
$("body").append(node);
$("body *").not("modal").hide();
});
css
#modal{
/*style modal here */
}
Doing what you say will likely damage the SEO, however is possible with some simple css an jquery as long as the user has scripting active. CSS and HTML can achieve the majority of what you want without the need for Jquery or scripting.
A properly implemented 301 redirect will ensure google maps across and acknowledges the movements of pages from one domain to another. BUt you need to do this properly.
I was wondering if using Lightbox all over the site would be a smart idea.
We are developing an eCommerce site and the idea is to keep the user on the main page all the time and show all the content (Product Page, About us etc) in a Lightbox way.
I understand that in order to use Lightbox you'll need Prototype/JavaScript which are widely supported at most browsers, I'm also aware that Ligthbox on mobile is not really fun but we are going to create a mobile version anyhow, A few Qs:
Do you think Lightbox might be heavy somehow? will it reduce site performance?
Do you think there are going to be big compability issues?
Any other thoughts why that not such a good idea? Again, the main idea is to keep the user at the main page while he can browse 'less important'.
Thanks in advance.
I think it's not a good idea to use lightbox massively to show relevant content for many reason
Accessibility: you cannot rely only on javascript to access the information so you need to put much more effort to develop with progressive enhancement. How if I navigate products through the browser history?
SEO: have you thought how to make your products retrievable by search engines? To make dynamic content indexable you will need again more extra effort. Consider also the possibility of being penalized for hidden contents on the page.
Usability: How would you deal with multiple devices and screen resolution? What if you show the image product in a lightbox and then your customer ask to also show the zoom images in a lightbox too? Will you open nested lightbox?
Social Network : "like" and "+1" are common functions on almost every modern e-commerce: but these actions can be performed only on a single URL, so if your products are not associated to a specific url (1 to 1 relation) you won't be able to share a specific item.
So, It's better to avoid all these complications
Use instead lightbox for giving alerts, show modal window and tell the user about the result of some server operation (e.g. Login/logout messages, alert the end of stock for an item during checkout...) and, in general, everywhere it's better not to completely change or break the navigation flow (e.g. registration, checkout,...), but definitely avoid to organize the entire site in lightboxes.
If you are developing an e-commerce site, then its not a good idea to use lightbox style ajax for loading all pages, because then search engines will not be able to index your products and display to people on search results.
In the past, I've used Fancybox over Lightbox mainly because I found it to be more flexible for my needs.
I too have created a online store using Fancybox with embedded popups to give the user more information on a popup.
What I would say is that to ensure page performance is not hindered, do not render a Fancybox popup through a hidden div on the page. If the hidden div contains a lot of images and content, this will cause some overhead.
The way I've used Fancybox is by loading an external page as its content source:
$("#product-info").fancybox({
titleShow : false,
width: 500,
height: 600,
autoDimensions: false,
overlayOpacity: 0.6,
href: 'product-info.aspx?ID=9' // External page source
});
I think just use a Fancybox/lightbox with caution. Only add basic product content. Keep the detailed for the product page itself. This will help Google searches (as other people have commented).
I agree with all of F.Calderan's points except maybe the last. I think there is a common use case in the "Quick View" seen on many clothing sites that could work for you. It provides a similar experience to the one you describe while not replacing all the benefits of having multiple pages.
See Old Navy for an example.
I need some good tutorials on designing a chat window.I have the basic window designed but i want something lik in gmail,facebook...
thanks
A peculiar question!
Well, just look at another chat implementation (e.g. in Facebook), and take your design cues from there if you can't figure it out yourself.
At the most basic level in HTML, you will be designing a form, with some kind of chat viewing pane (perhaps just a large textarea), plus another textarea element and a "Submit" button for the current user to use when sending comments to the chat.
It's really not so hard.
The hard part is building the chat application itself. Obviously you can't do that solely with HTML and CSS.