This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246318 - Show all folders of HTML5 project
Summary: Show all folders of HTML5 project
Status: RESOLVED WONTFIX
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2014-08-07 05:42 UTC by Tomas Mysik
Modified: 2014-09-22 08:07 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2014-08-07 05:42:30 UTC
Because there are more and more reasonable complains about inaccessible/invisible directories of HTML5 projects in the Projects view (see #246305, for example), I plan to simply show all the directories in it. The existing Site Root and Unit Tests folder would be still present of course. This way it works in the PHP projects (user has Source Files and one of its folder can be configured to be a web root [directory accessible by a web server]). All the existing functionality would remain, I mean source paths, Important Files node etc. (if it will not break anything).

Let me know if you have any objections, thanks.
Comment 1 Martin Fousek 2014-08-07 05:53:20 UTC
Sounds well, it will uncover folders like our config, grunt etc. which are inaccessible now in the project view although developers sometimes need to work with them. Thanks.
Comment 2 Vladimir Riha 2014-08-07 06:46:11 UTC
I see 2 nice advantages of the current status:
 - files outside of site root are not being scanned and are not visible (if you have only Grunt task, code completion from node_modules is not going to be useful) 
 - They are often marked as having syntax errors which they have but thanks to how NodeJS is loading modules this error doesn't matter. But if the folder will be marked with error, it might not look good.


Would these 2 remain? If not, I think it would really help to have issue 238709 (support for ignored folders) fixed as well
Comment 3 Vladimir Riha 2014-08-07 06:46:53 UTC
(In reply to Vladimir Riha from comment #2)
> They are often marked as having syntax errors 

I mean the node_modules folder
Comment 4 Tomas Mysik 2014-08-07 07:14:45 UTC
(In reply to Vladimir Riha from comment #2)
> I see 2 nice advantages of the current status:
>  - files outside of site root are not being scanned and are not visible (if
> you have only Grunt task, code completion from node_modules is not going to
> be useful) 
>  - They are often marked as having syntax errors which they have but thanks
> to how NodeJS is loading modules this error doesn't matter. But if the
> folder will be marked with error, it might not look good.

IMHO you are wrong Láďo. As I wrote, source path will NOT change, it should mean that only Site Root and Unit Tests folders will be scanned by NetBeans. But need to verify it, of course.

Thanks.
Comment 5 Vladimir Riha 2014-08-07 07:25:46 UTC
It is possible :) I compared it to the PHP project's Source Files/Web root
Comment 6 Tomas Mysik 2014-08-07 07:59:56 UTC
To avoid UI mess, we will need to put these files/folders under some node - maybe "Other"? Or perhaps better "All Files"?
Comment 7 Tomas Mysik 2014-08-07 09:17:51 UTC
All Files node added (with no context actions) - let me know if you like it and if I should continue with this issue.

Thanks.

http://hg.netbeans.org/web-main/rev/d3fd19f1ab8f
Comment 8 Quality Engineering 2014-08-08 02:32:05 UTC
Integrated into 'main-silver', will be available in build *201408080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d3fd19f1ab8f
User: Tomas Mysik <tmysik@netbeans.org>
Log: #246318 - Show all folders of HTML5 project
Comment 9 David Konecny 2014-08-08 04:36:01 UTC
To me this goes against philosophy of project's logical view. I would try to avoid doing this unless we have set of strong usecases where all files are really needed.

Re. issue 246305 - Grunt support in NB should list all relevant grunt files under "Important Files" node. That's what the traditional answer/solution would be.

After using HTML5 project for more than half a year actively I rarely needed to see non Site Root files. But on the other hand it is MartinF who was writing Grunt scripts - I just run them so perhaps Martin's opinion is more relevant here than mine.
Comment 10 Martin Fousek 2014-08-08 05:00:26 UTC
(In reply to David Konecny from comment #9)
> After using HTML5 project for more than half a year actively I rarely needed
> to see non Site Root files. But on the other hand it is MartinF who was
> writing Grunt scripts - I just run them so perhaps Martin's opinion is more
> relevant here than mine.

Sorry, to be honest I don't have strong opinion between solutions:
a) All Files
b) Important Files/grunt + Important Files/<custom folders>

The advantages of a) is the fact that it can serve as a "workaround" for other developers use cases, on the other hand it doesn't correspond with philosophy of the logical view as mentioned by David.

The best solution could be to go through similar user reports and fit them to solution a) or b). As I mentioned I'm afraid that user requests will be too unique so more powerful solution like a) will be necessary.
Comment 11 Tomas Mysik 2014-08-12 07:48:16 UTC
The current state is a *proposal* (therefore the Status of this issue is STARTED); a proposal for you guys to be able to test it and let me know what you think about it. Feel free to propose another/better solution (e.g. a checkbox "Show all files in Projects view" in Project Properties or perhaps some kind of list of directories that should be accessible in the Projects view under "Other/More Files" node?).

In any case, I think that something like this is needed because apparently not all user projects fit our design (I mean NB 8.0).

Thanks.
Comment 12 David Konecny 2014-08-13 00:34:16 UTC
It would help to start with a list of concrete complaints: "this is my project structure and this is how I use it and this is what I lack in NB's logical view". Having few of those would help us to shape right solution.
Comment 13 Petr Jiricka 2014-08-13 07:45:01 UTC
Also, my impression is that what we discussed is that the right way to expose all files/folders is to direct users to the Files view, and add project actions on the Files view nodes, no?
Comment 14 Vladimir Riha 2014-08-15 06:57:52 UTC
And how about changing the default HTML5 project structure so that site root == project root (or let user choose in New Project wizard)? If you create a HTML5 project from existing sources, this structure is already possible. That would let users to decide what fits their needs better.
Comment 15 David Konecny 2014-08-18 01:48:43 UTC
(In reply to Vladimir Riha from comment #14)
> And how about changing the default HTML5 project structure so that site root
> == project root

That would have many negative consequences. Imagine doing the same in eg. J2SE project: making java sources root == project root. It results into a big mess and cripples most of IDE functionality as single folder can be anything. And it never scales as project grows.
Comment 16 Tomas Mysik 2014-09-22 08:07:40 UTC
(In reply to Petr Jiricka from comment #13)
> Also, my impression is that what we discussed is that the right way to
> expose all files/folders is to direct users to the Files view, and add
> project actions on the Files view nodes, no?

Correct, TomasS will work on it I suppose (based on his e-mail from 2014/8/20) so closing as WONTFIX.

Also, removing the "All Files" node (moreover, now one can easily select project directory as Sources as a workaround if needed).

Thanks.

http://hg.netbeans.org/web-main/rev/06905ae732f4