Startpage redesign

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

User avatar
kkremitzki
Posts: 1758
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Startpage redesign

Post by kkremitzki » Tue May 23, 2017 5:23 pm

saso wrote:
yorik wrote:However, javascript is apparently forbidden to load contents from other domains than the one it is running from. That prevents from fetching stuff from the tracker or forum. The only exception is when using the JSON format, which AFAICS none of our webapps supports, only Github (that's why I was able to fetch the commits from github).

If any of you webgurus has an idea to remove that barrier, then we can do much more interesting stuff :)
It is possible that some of the security flags for the website that we have set up recently are blocking this https://forum.freecadweb.org/viewtopic. ... 78#p174779 , we can test this by adding a hash (#) in front of individual flags to disable them, for example:

Code: Select all

#Header always set Content-Security-Policy "frame-ancestors 'none'"
#Header always set X-Frame-Options "deny"
Personally however, from security point of view, I don't really like putting all this web functionality in to FC. We are potentially giving users a very unsafe "browser" to access and browse the web with. IMO there are some possible real dangers here. IMO it is better if users browse the web from their hopefully updated browsers.
It isn't one of those flags, it's same-origin policy. It depends on the individual web apps to implement an API which serves JSON.

It just so happens MantisBT did this recently. MediaWiki also has one, but phpBB does not, from what I can see. There's a plugin that hasn't had activity in ~3 years that may or may not work.

I agree with your last paragraph about security, though. Content displayed in FreeCAD displayed from the web should be minimized, if not for security alone, but also for the fact that it's kinda tough to make it look good when someone's offline.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.

HoWil
Posts: 840
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Startpage redesign

Post by HoWil » Fri Jun 02, 2017 7:17 pm

Is it possible to span the startpage also over the combo-view. Combo-view is not usefull at startup and is only distracting new users.

In my opinion only the 'open' and 'new' buttons should be visible (maybe also the macro dialog) at startup everything else is not needed and simply confusing newbies. If you could incorporate these buttons into your startpage than all other GUI elements could be completely removed at startup, simplifying the entry point massively.

EDIT: I overlooked your "Create new" button.... maybe a big '+' inside would be better

BR
HoWil

User avatar
yorik
Site Admin
Posts: 11552
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Startpage redesign

Post by yorik » Sat Jun 03, 2017 5:22 pm

It is possible to hide GUI stuff like the combo box, etc.. But I'm not sure this won't bring in more problems than it solves, I'm sure many users will manage to "loose" the combobox... :D

Anyway, I think I'd rather concentrate on what happens "inside" the start page first, then we see about modifying the GUI...

User avatar
bitacovir
Posts: 710
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Startpage redesign

Post by bitacovir » Sun Jun 04, 2017 12:04 am

What do you think about to include in the Star Page a notice board or a bulletin board, with official and very important news about FreeCAD?
I think in a box at the right side in the first tab with a title like "FREECAD TODAY" referring to important news for general users.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My Blog
Mini Airflow Tunnel Project

User avatar
yorik
Site Admin
Posts: 11552
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Startpage redesign

Post by yorik » Mon Jun 05, 2017 3:22 pm

That could be nice, but where will we get those official and very important news about FreeCAD from? :D

In the early times there was a "tip of the day" feature, but it stayed like, 3 years with the same five tips, so it got abandonned. All the problem is having a good and interesting source to take these things from.

User avatar
bitacovir
Posts: 710
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Startpage redesign

Post by bitacovir » Wed Jun 07, 2017 10:33 am

yorik wrote:
Mon Jun 05, 2017 3:22 pm
That could be nice, but where will we get those official and very important news about FreeCAD from? :D

In the early times there was a "tip of the day" feature, but it stayed like, 3 years with the same five tips, so it got abandonned. All the problem is having a good and interesting source to take these things from.
Yes. It is true. It can be tedious job and time consuming to fill this bulletin board manually. I just though it can be another channel or extension of the FreeCAD social network. Here, in this forum, I have seen a lot of interesting news about FreeCAD (maybe is a recent phenomenon), and they are being promoted through Facebook, Twitter, your personal blog, etc. Google Summer of Code 2017, WikiLab Crowdfunding campaign, Wikihouse Fundation's interview to Yorik, your Patreon campaign, new youtube tutorials about FreeCAD, articles of FreeCAD in Journals, users showcases, feature announcements (you publish a complete summary of FreeCAD news each month in your blog, don't you?)
I understand it is problematic to add another social network channel to administrate for people already very busy. It would be ideal a bulletin board that automatically can generate titles/links to all these news sources without human intervention. :)
Anyway. Maybe it is redundant, and Facebook, Twitter, your blog are more than enough as current social network channels.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My Blog
Mini Airflow Tunnel Project

User avatar
yorik
Site Admin
Posts: 11552
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Startpage redesign

Post by yorik » Wed Jun 07, 2017 5:50 pm

There are some ongoing talks here and there to "unify" a bit more all these news sources into a kind of official channel, but so far nothing concrete came out...

I do a review of what's been going on each month on my blog, it's true, but it's a very partial view based mostly on my own interests, I miss a lot of stuff that is happening in other areas, so it could not be used to give a fair, general view of everything that is happening.

The ideal would be other people starting to write about other areas of FreeCAD, so together we could have some good and regular coverage 8-)

User avatar
Gift
Posts: 458
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Startpage redesign

Post by Gift » Sat Aug 05, 2017 7:02 am

yorik wrote:
Tue May 23, 2017 1:57 pm
...

One detail I don't know how to solve yet. To make the loading of the start page fast, it cannot "wait" for web content to be loaded. It must first load without any web content, then anything from the web must be fetched after the page loaded, that is, by pure javascript. However, javascript is apparently forbidden to load contents from other domains than the one it is running from. That prevents from fetching stuff from the tracker or forum. The only exception is when using the JSON format, which AFAICS none of our webapps supports, only Github (that's why I was able to fetch the commits from github).

...
You write a simple proxy. e.g. fc_proxy_bt.php:

Code: Select all

<?php
// src by Gabriele Romanato, see http://onwebdev.blogspot.com/2011/08/php-converting-rss-to-json.html 

header('Content-Type: application/json');
$feed = new DOMDocument();
$feed->load('https://www.freecadweb.org/tracker/issues_rss.php');
$json = array();                                 

                                 
$json['title'] = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('title')->item(0)->firstChild->nodeValue;
$json['description'] = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('description')->item(0)->firstChild->nodeValue;
$json['link'] = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('link')->item(0)->firstChild->nodeValue;

$items = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('item');

$json['item'] = array();
$i = 0;


foreach($items as $item) {

   $title = $item->getElementsByTagName('title')->item(0)->firstChild->nodeValue;
   $description = $item->getElementsByTagName('description')->item(0)->firstChild->nodeValue;
   $pubDate = $item->getElementsByTagName('pubDate')->item(0)->firstChild->nodeValue;
   $guid = $item->getElementsByTagName('guid')->item(0)->firstChild->nodeValue;
   
   $json['item'][$i++]['title'] = $title;
   $json['item'][$i++]['description'] = $description;
   $json['item'][$i++]['pubdate'] = $pubDate;
   $json['item'][$i++]['guid'] = $guid;   
     
}


echo json_encode($json);

?>

User avatar
yorik
Site Admin
Posts: 11552
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Startpage redesign

Post by yorik » Mon Aug 07, 2017 12:12 am

Gift wrote:
Sat Aug 05, 2017 7:02 am
You write a simple proxy. e.g. fc_proxy_bt.php:
Thanks! That might be very useful...

Post Reply