-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Only show the database login fields when necessary #2615
Only show the database login fields when necessary #2615
Conversation
The database login field’s visibility is now controled by CSS styling.
Change field name from Database to Database file.
Use full db name instead of diminutives for the CSS classes.
Added translation to the Input placeholders.
remerge Database field and DatabaseFile Field like before.
Created Refine.DatabaseSourceUI.prototype._updateDatabaseType(databaseType)
<option value="mysql" selected="selected"">MySQL</option>
Fixed typo. (<option value="mysql" selected="selected">MySQL</option>)
New default connection name value, translation of it, changing cssClassName from options to dbtype-options, adding the prefix "dbt-" to the db types and fix the changing of placeholder databaseName/databaseFileName when neccessary.
Fix issue with « saved connections » and added 2 defaults values for dbHost and dbType.
<option value="mysql" selected="selected">MySQL</option>
@wetneb & @thadguidry: so, I guess it's pretty done.
If you fell there is something else to do, let me know. Regards, |
@thadguidry: when you have the time, I really think you should check this enhancement. I actually think it's more a bug fix for interface. Anyway, I think we should put it in v3.4, since it's to make SQLite very simple to use. And now if we have « Access to a JS object on the client side with all the preferences, that would not be updated (frequently) #2619 », we could even store a default value for database server, and database type. Regards, |
Co-authored-by: Thad Guidry <thadguidry@gmail.com>
@antoine2711 It would be really nice to have both Travis and Appveyor, actually test create the sqlite and test... as well as fix the UPDATE: Hmm, looks like a syntax error, we probably don't need that USE line any longer in And why is this comment still here? https://github.com/OpenRefine/OpenRefine/blob/master/extensions/database/tests/conf/travis_tests.xml#L32 Did something not get put back into place correctly? a6424e5 Groups run nothing? Is that a problem? Sorry for exploding a bunch of questions here for you and @wetneb to dig into, to ensure integrity on our database extension testing on Travis and Appveyor is healthy again and working correctly fully. Thanks! |
Sure, I could learn how to do that and implement it. I wouldn't be fast, though. I will follow the discussion here. If you have links to docs on that matter, please share. Would you like me to create a new issue: « Fix Travis and Appveyor tests for databases ». Would that be good? I think it could deserve a dedicated attention. Regards, |
@antoine2711 yes please, new issue with my facts above. Create the new issue, use a new branch, and iterate on it until db tests are working well on Appveyor and Travis. Looks like mostly just some .yml file updates and .sql file updates in various places are all that's needed. You can see the previous pqsql and mysql as examples...oh wait, we have sqlite already by that fellow a few months ago...so just ensure Appveyor and Travis are indeed testing the DB extension against those 3, postgres, mysql, sqlite properly. |
From another thread, « might » be fixed here:
|
@thadguidry: I don't understand where it fails. If I do:
Where can I see the failing you are talking about? Regards, |
The first thing to fix is to make sure that the run gets marked as failed when it hits an error like this. |
@thadguidry the errors you mention are unrelated to this PR. Yes it would be worth cleaning up this SQL script but this is completely independent from these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be an issue with database path validation for the SQLite set-up. If I try to connect to a SQLite database via its full path, I get the error Connection Name Input Error: Illegal Character in Input. Only [a-zA-Z0-9._-] Allowed
, which does not happen on master branch.
Some of the placeholders added in the form inputs seem redundant with the field labels. It does not feel natural to me to have all these "Enter …" prefixes there (these are text fields - the user already knows that they need to enter something there). Also I would not capitalize every word there - these are not titles, so let's not use title case for them.
For instance having "Enter Database" as placeholder for a "Database" field is not helpful. I would prefer to have something like "database name" instead, since that is more precise - but to be honest this could just be the label of the field itself.
@wetneb: oh! I never saw that. My first impression, is that some data in other fields (hidden for sqlite) are containing bad data. I'll check it.
I hear you, and I share your opinion, but, before going further here, I must say that I didn't write this stuff, all of that was previously there in the HTML (the english version). I only factorized it with i18n code. The french version, on the other hand, is all of my writing. So, in english, I can remove all capitals, except the first, and change « database name ». For the rest, I wouldn't put now too much time, as the i18n data is now exposed, and easier to follow/clean. Regards, |
Fix $( "#databaseHost" ).val(self._defaultDatabaseHost) to be set before calling self._updateDatabaseType(self._defaultDatabaseType) that may change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks, I am happy with cleaning up the labels in a follow-up PR.
extensions/database/module/scripts/index/database-import-form.html
Outdated
Show resolved
Hide resolved
@wetneb: It's fixed. The problem was the name of the connection, it can't have space. So I changed the default to What do we do about the test button which always succeed, even when the path is bad? I think another issue should be opened for that. Regards, |
Removed field name text since it's populated from i18n and fixed the default connection name so that it has no space in it.
@thadguidry: per your request, here's the new issue to bring back the Travis and Appveyor tests. Don't hesitate to modify it, of course. I tried to edit it a bit, but still far from perfect. Regards, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for that!
You're welcome. It was a pleasure working with you on that. Thanks for your support and guidance. Best Regards, |
* Add a Show/Hide left panel Add a Show/Hide left Facets-Undo/Redo panel. * Update summary-bar.js Simplify the code for the "hide-left-panel-button". * Remove the gap on the left of the button Remove the gap on the left of the button and align left with table. * Translated using Weblate (Japanese) Currently translated at 100.0% (740 of 740 strings) Translation: OpenRefine/Translations Translate-URL: https://hosted.weblate.org/projects/openrefine/translations/ja/ * Translated using Weblate (Japanese) Currently translated at 100.0% (171 of 171 strings) Translation: OpenRefine/wikidata Translate-URL: https://hosted.weblate.org/projects/openrefine/wikidata/ja/ * Translated using Weblate (Japanese) Currently translated at 100.0% (47 of 47 strings) Translation: OpenRefine/gdata Translate-URL: https://hosted.weblate.org/projects/openrefine/gdata/ja/ * Updated showhide (collapse) arrow image * Bolden the border dark-blue Bolden the border dark-blue * Changed from SPAN to A tag Changed from SPAN to A tag. * Update project.less Minor change: left: 22px; * Add a Show/Hide left panel Add a Show/Hide left Facets-Undo/Redo panel. * Update summary-bar.js Simplify the code for the "hide-left-panel-button". * Remove the gap on the left of the button Remove the gap on the left of the button and align left with table. * Updated showhide (collapse) arrow image * Bolden the border dark-blue Bolden the border dark-blue * Changed from SPAN to A tag Changed from SPAN to A tag. * Update project.less Minor change: left: 22px; * Changed cell.error to cell.errorMessage & added help data. (#2628) * Changed cell.error to cell.errorMessage & added help data. Changed cell.error to cell.errorMessage and added the informations into the internal help system. * FR Text correction * HU Fix text 3 instead of 2. * The show/hide button now changes side The show/hide button now changes side. * Update project.js Removed unneeded self. * Update summary-bar.js Removed unneeded self. * [Security] Bump jackson.version from 2.9.10 to 2.11.0 Bumps `jackson.version` from 2.9.10 to 2.11.0. Updates `jackson-databind` from 2.9.10 to 2.11.0 - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Updates `jackson-annotations` from 2.9.10 to 2.11.0 - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Updates `jackson-core` from 2.9.10 to 2.11.0 - [Release notes](https://github.com/FasterXML/jackson-core/releases) - [Commits](FasterXML/jackson-core@jackson-core-2.9.10...jackson-core-2.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Translated using Weblate (Russian) Currently translated at 91.0% (674 of 740 strings) Translation: OpenRefine/Translations Translate-URL: https://hosted.weblate.org/projects/openrefine/translations/ru/ * Only show the database login fields when necessary (#2615) * DB login fields visibility controled by CSS The database login field’s visibility is now controled by CSS styling. * Change field name from Database to Database file. Change field name from Database to Database file. * Use full db name as CSS classes Use full db name instead of diminutives for the CSS classes. * Added translation to placeholders Added translation to the Input placeholders. * Undo a change, remerge Database field & File remerge Database field and DatabaseFile Field like before. * Created DatabaseSourceUI._updateDatabaseType(dbType) Created Refine.DatabaseSourceUI.prototype._updateDatabaseType(databaseType) * Make MySQL the default database <option value="mysql" selected="selected"">MySQL</option> * Update database-import-form.html Fixed typo. (<option value="mysql" selected="selected">MySQL</option>) * New default connection name value New default connection name value, translation of it, changing cssClassName from options to dbtype-options, adding the prefix "dbt-" to the db types and fix the changing of placeholder databaseName/databaseFileName when neccessary. * Fix issue with « saved connections » Fix issue with « saved connections » and added 2 defaults values for dbHost and dbType. * Default DB back to MySQL. <option value="mysql" selected="selected">MySQL</option> * Update extensions/database/module/langs/translation-en.json Co-authored-by: Thad Guidry <thadguidry@gmail.com> * Better default with « mysql » * Fix sqlite #databaseHost before calling self._updateDatabaseType() Fix $( "#databaseHost" ).val(self._defaultDatabaseHost) to be set before calling self._updateDatabaseType(self._defaultDatabaseType) that may change it. * Removed field name & fixed default connection name Removed field name text since it's populated from i18n and fixed the default connection name so that it has no space in it. * Little update to placeholder text Co-authored-by: Thad Guidry <thadguidry@gmail.com> * Resize the grid UI as well Co-authored-by: Isao Matsunami <isao.matsunami@gmail.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Thad Guidry <thadguidry@gmail.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Tom Morris <tfmorris@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
The database login field’s visibility are now controlled by CSS styling.
Choosing sqlite will only show the database field.
Regards,
Antoine