Skip to content
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

[#809] fix: SQL input field width to improve UX for larger queries #810

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

keevan
Copy link
Contributor

@keevan keevan commented Jul 18, 2023

Resolves #809

Before:
image

After:

image

@keevan
Copy link
Contributor Author

keevan commented Jul 18, 2023

I tried using a class (w-100) instead of adding to the styles, but I don't think I'm applying it properly.

e.g. these didn't work:

        $mform->addElement('textarea', 'config_sql', get_string('reader_sql:sql', 'tool_dataflows'),
            ['class' => 'w-100', 'cols' => 50, 'rows' => 7, 'style' => 'font: 87.5% monospace;']);
        $mform->addElement('textarea', 'config_sql', get_string('reader_sql:sql', 'tool_dataflows'),
            ['class' => 'w-100', 'rows' => 7, 'style' => 'font: 87.5% monospace;']);

@keevan keevan force-pushed the 809-sql-input-field-width-adjustment branch from a0a3f62 to fdeda38 Compare July 18, 2023 04:26
* @param \MoodleQuickForm $mform
* @param \stdClass $data
*/
public function form_definition_after_data(\MoodleQuickForm &$mform, \stdClass $data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me wonder whether this should be an abstract class instead. This is more an idle thought, no changes required.

@Peterburnett Peterburnett merged commit 51ec159 into MOODLE_35_STABLE Jul 18, 2023
25 checks passed
@Peterburnett Peterburnett deleted the 809-sql-input-field-width-adjustment branch July 18, 2023 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL textareas are too small
2 participants