New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributed examples do not display in the Examples window #3420

Closed
joelmoniz opened this Issue Jun 22, 2015 · 9 comments

Comments

Projects
None yet
6 participants
@joelmoniz
Member

joelmoniz commented Jun 22, 2015

At present, contributed examples do not seem to be displaying in the Examples window:

image

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jun 22, 2015

Member

And you're sure about this—are there any legitimate examples packages to even test against?

Member

benfry commented Jun 22, 2015

And you're sure about this—are there any legitimate examples packages to even test against?

@joelmoniz

This comment has been minimized.

Show comment
Hide comment
@joelmoniz

joelmoniz Jun 22, 2015

Member

Yeah. When I was testing out the Examples Manager for bugs, I'd created an examples package here that consisted of code stolen, ummm... I mean borrowed, from the G4P library. It even contains a fake contributions.txt that I used to use to ensure that the Examples Manager unpacked, installed, displayed, updated downloaded examples properly. This package does not display. I traced this to the removal of a method when the Examples window was being redesigned, that I'd initially added in to display the contributed examples in this window.

Member

joelmoniz commented Jun 22, 2015

Yeah. When I was testing out the Examples Manager for bugs, I'd created an examples package here that consisted of code stolen, ummm... I mean borrowed, from the G4P library. It even contains a fake contributions.txt that I used to use to ensure that the Examples Manager unpacked, installed, displayed, updated downloaded examples properly. This package does not display. I traced this to the removal of a method when the Examples window was being redesigned, that I'd initially added in to display the contributed examples in this window.

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman Jul 24, 2015

Member

I'm re-opening this issue. In 0239, I have the nature of code examples package installed, but I do not see them in the examples window. The files are in the examples folder inside my sketchbook.

screen shot 2015-07-24 at 2 00 47 pm

Member

shiffman commented Jul 24, 2015

I'm re-opening this issue. In 0239, I have the nature of code examples package installed, but I do not see them in the examples window. The files are in the examples folder inside my sketchbook.

screen shot 2015-07-24 at 2 00 47 pm

@shiffman shiffman reopened this Jul 24, 2015

@joelmoniz

This comment has been minimized.

Show comment
Hide comment
@joelmoniz

joelmoniz Jul 24, 2015

Member

I can confirm that the error isn't fixed yet. 2 changes will need to be made:

  1. The default value for modes is set to "null" if the field isn't present in the examples.properties file. The problem is, "null" is read as a string, not as null. @prisonerjohn could you please change this so that either nothing is added if the modes property is absent, or the modes property is written like the paragraph property (modes=) if nothing is specified in the properties file?
  2. In case nothing is added, then this issue should be fixed. Otherwise, in case it is written in the form modes=, I'll file a PR if it is preferable to write the default as modes= as soon as the changes are made.
Member

joelmoniz commented Jul 24, 2015

I can confirm that the error isn't fixed yet. 2 changes will need to be made:

  1. The default value for modes is set to "null" if the field isn't present in the examples.properties file. The problem is, "null" is read as a string, not as null. @prisonerjohn could you please change this so that either nothing is added if the modes property is absent, or the modes property is written like the paragraph property (modes=) if nothing is specified in the properties file?
  2. In case nothing is added, then this issue should be fixed. Otherwise, in case it is written in the form modes=, I'll file a PR if it is preferable to write the default as modes= as soon as the changes are made.
@alignedleft

This comment has been minimized.

Show comment
Hide comment
@alignedleft

alignedleft Jul 24, 2015

Member

Thanks @shiffman and @joelmoniz. @Akarshit can you look into this as well?

Member

alignedleft commented Jul 24, 2015

Thanks @shiffman and @joelmoniz. @Akarshit can you look into this as well?

@Akarshit

This comment has been minimized.

Show comment
Hide comment
@Akarshit

Akarshit Jul 24, 2015

Member

Ya sure, but i think first @prisonerjohn should take a look into what @joelmoniz has suggested.

Member

Akarshit commented Jul 24, 2015

Ya sure, but i think first @prisonerjohn should take a look into what @joelmoniz has suggested.

@prisonerjohn

This comment has been minimized.

Show comment
Hide comment
@prisonerjohn

prisonerjohn Jul 24, 2015

Member

@joelmoniz What exactly do you mean when you say "nothing is added if the modes property is absent"? Where is something added that shouldn't be added?

FWIW, paragraph= is not added by default when the key is not present. I think we're seeing it often because it's part of the template and example .properties files.

Member

prisonerjohn commented Jul 24, 2015

@joelmoniz What exactly do you mean when you say "nothing is added if the modes property is absent"? Where is something added that shouldn't be added?

FWIW, paragraph= is not added by default when the key is not present. I think we're seeing it often because it's part of the template and example .properties files.

@joelmoniz

This comment has been minimized.

Show comment
Hide comment
@joelmoniz

joelmoniz Jul 24, 2015

Member

@prisonerjohn Oops. Sorry. My bad.This issue arises because the Contributions Manager adds in the extra line here without a null check.

Member

joelmoniz commented Jul 24, 2015

@prisonerjohn Oops. Sorry. My bad.This issue arises because the Contributions Manager adds in the extra line here without a null check.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 9, 2015

Member

Fixed this for 3.0 beta 2.

Member

benfry commented Aug 9, 2015

Fixed this for 3.0 beta 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment