Page 2 of 2

Re: Startpage redesign

Posted: Tue May 23, 2017 5:23 pm
by kkremitzki
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.

Re: Startpage redesign

Posted: Fri Jun 02, 2017 7:17 pm
by HoWil
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

Re: Startpage redesign

Posted: Sat Jun 03, 2017 5:22 pm
by yorik
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...

Re: Startpage redesign

Posted: Sun Jun 04, 2017 12:04 am
by bitacovir
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.

Re: Startpage redesign

Posted: Mon Jun 05, 2017 3:22 pm
by yorik
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.

Re: Startpage redesign

Posted: Wed Jun 07, 2017 10:33 am
by bitacovir
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.

Re: Startpage redesign

Posted: Wed Jun 07, 2017 5:50 pm
by yorik
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-)

Re: Startpage redesign

Posted: Sat Aug 05, 2017 7:02 am
by Gift
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);

?>

Re: Startpage redesign

Posted: Mon Aug 07, 2017 12:12 am
by yorik
Gift wrote: Sat Aug 05, 2017 7:02 amYou write a simple proxy. e.g. fc_proxy_bt.php:
Thanks! That might be very useful...

Re: Startpage redesign

Posted: Tue Jun 14, 2022 3:28 pm
by jimmihenry
Hi together,

yes i am late to the "party" but i would like to share my artwork "background image" for the Start Page.
The *.svg file is the source that can ba altered as you wish. The *.png file is for direct usage via the
"Background Image" button. Go to the "Main Menu" -> "Edit" -> "Preferences"...
I used Inkscape for the creation.